pgsql: Avoid use of CREATE OR REPLACE FUNCTION in extension installatio

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid use of CREATE OR REPLACE FUNCTION in extension installatio
Date: 2011-02-14 03:55:39
Message-ID: E1PopXH-0003pq-NN@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/029fac2264101919b65fb6319bb994f941969471

Modified Files
--------------
contrib/adminpack/adminpack--1.0.sql | 16 +-
contrib/btree_gin/btree_gin--1.0.sql | 136 +++---
contrib/btree_gist/btree_gist--1.0.sql | 242 ++++++------
contrib/chkpass/chkpass--1.0.sql | 10 +-
contrib/citext/citext--1.0.sql | 74 ++--
contrib/cube/cube--1.0.sql | 70 ++--
contrib/dblink/dblink--1.0.sql | 80 ++--
contrib/dict_int/dict_int--1.0.sql | 4 +-
contrib/dict_xsyn/dict_xsyn--1.0.sql | 4 +-
contrib/earthdistance/earthdistance--1.0.sql | 20 +-
contrib/fuzzystrmatch/fuzzystrmatch--1.0.sql | 20 +-
contrib/hstore/hstore--1.0.sql | 104 +++---
contrib/intagg/int_aggregate--1.0.sql | 6 +-
contrib/intarray/intarray--1.0.sql | 90 ++--
contrib/isn/isn--1.0.sql | 490 +++++++++++-----------
contrib/lo/lo--1.0.sql | 4 +-
contrib/ltree/ltree--1.0.sql | 140 +++---
contrib/pageinspect/pageinspect--1.0.sql | 16 +-
contrib/pg_buffercache/pg_buffercache--1.0.sql | 2 +-
contrib/pg_freespacemap/pg_freespacemap--1.0.sql | 4 +-
contrib/pg_trgm/pg_trgm--1.0.sql | 38 +-
contrib/pgcrypto/pgcrypto--1.0.sql | 66 ++--
contrib/pgrowlocks/pgrowlocks--1.0.sql | 2 +-
contrib/pgstattuple/pgstattuple--1.0.sql | 8 +-
contrib/seg/seg--1.0.sql | 58 ++--
contrib/spi/autoinc--1.0.sql | 2 +-
contrib/spi/insert_username--1.0.sql | 2 +-
contrib/spi/moddatetime--1.0.sql | 2 +-
contrib/spi/refint--1.0.sql | 4 +-
contrib/spi/timetravel--1.0.sql | 6 +-
contrib/sslinfo/sslinfo--1.0.sql | 18 +-
contrib/tablefunc/tablefunc--1.0.sql | 22 +-
contrib/test_parser/test_parser--1.0.sql | 8 +-
contrib/tsearch2/tsearch2--1.0.sql | 22 +-
contrib/unaccent/unaccent--1.0.sql | 8 +-
contrib/uuid-ossp/uuid-ossp--1.0.sql | 20 +-
contrib/xml2/xml2--1.0.sql | 26 +-
37 files changed, 922 insertions(+), 922 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-02-14 04:33:55 pgsql: More fixups for "unpackaged" conversion scripts.
Previous Message Bruce Momjian 2011-02-14 03:03:21 pgsql: Clarify documentation for libpq's PQescapeBytea to mention the n