OSDN Git Service

Avoid use of CREATE OR REPLACE FUNCTION in extension installation files.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 14 Feb 2011 02:24:14 +0000 (21:24 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 14 Feb 2011 03:54:52 +0000 (22:54 -0500)
commit029fac2264101919b65fb6319bb994f941969471
treeedb89110508318a04730a7caa42d312e050ef7ce
parent629b3af27d5c2bc9d6e16b22b943ad651d4ecb56
Avoid use of CREATE OR REPLACE FUNCTION in extension installation files.

It was never terribly consistent to use OR REPLACE (because of the lack of
comparable functionality for data types, operators, etc), and
experimentation shows that it's now positively pernicious in the extension
world.  We really want a failure to occur if there are any conflicts, else
it's unclear what the extension-ownership state of the conflicted object
ought to be.  Most of the time, CREATE EXTENSION will fail anyway because
of conflicts on other object types, but an extension defining only
functions can succeed, with bad results.
37 files changed:
contrib/adminpack/adminpack--1.0.sql
contrib/btree_gin/btree_gin--1.0.sql
contrib/btree_gist/btree_gist--1.0.sql
contrib/chkpass/chkpass--1.0.sql
contrib/citext/citext--1.0.sql
contrib/cube/cube--1.0.sql
contrib/dblink/dblink--1.0.sql
contrib/dict_int/dict_int--1.0.sql
contrib/dict_xsyn/dict_xsyn--1.0.sql
contrib/earthdistance/earthdistance--1.0.sql
contrib/fuzzystrmatch/fuzzystrmatch--1.0.sql
contrib/hstore/hstore--1.0.sql
contrib/intagg/int_aggregate--1.0.sql
contrib/intarray/intarray--1.0.sql
contrib/isn/isn--1.0.sql
contrib/lo/lo--1.0.sql
contrib/ltree/ltree--1.0.sql
contrib/pageinspect/pageinspect--1.0.sql
contrib/pg_buffercache/pg_buffercache--1.0.sql
contrib/pg_freespacemap/pg_freespacemap--1.0.sql
contrib/pg_trgm/pg_trgm--1.0.sql
contrib/pgcrypto/pgcrypto--1.0.sql
contrib/pgrowlocks/pgrowlocks--1.0.sql
contrib/pgstattuple/pgstattuple--1.0.sql
contrib/seg/seg--1.0.sql
contrib/spi/autoinc--1.0.sql
contrib/spi/insert_username--1.0.sql
contrib/spi/moddatetime--1.0.sql
contrib/spi/refint--1.0.sql
contrib/spi/timetravel--1.0.sql
contrib/sslinfo/sslinfo--1.0.sql
contrib/tablefunc/tablefunc--1.0.sql
contrib/test_parser/test_parser--1.0.sql
contrib/tsearch2/tsearch2--1.0.sql
contrib/unaccent/unaccent--1.0.sql
contrib/uuid-ossp/uuid-ossp--1.0.sql
contrib/xml2/xml2--1.0.sql