I've added a CREATEFUNCTION define in postgis.sql.in which is expanded to CREATE OR REPLACE FUNCTION for PG > 71 or CREATE FUNCTION otherwise. --strk;