diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-02-13 21:24:14 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-02-13 22:54:52 -0500 |
commit | 029fac2264101919b65fb6319bb994f941969471 (patch) | |
tree | edb89110508318a04730a7caa42d312e050ef7ce /contrib/pg_buffercache | |
parent | 629b3af27d5c2bc9d6e16b22b943ad651d4ecb56 (diff) | |
download | postgresql-029fac2264101919b65fb6319bb994f941969471.tar.gz |
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.
Diffstat (limited to 'contrib/pg_buffercache')
-rw-r--r-- | contrib/pg_buffercache/pg_buffercache--1.0.sql | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pg_buffercache/pg_buffercache--1.0.sql b/contrib/pg_buffercache/pg_buffercache--1.0.sql index a49d171e04..9407d21410 100644 --- a/contrib/pg_buffercache/pg_buffercache--1.0.sql +++ b/contrib/pg_buffercache/pg_buffercache--1.0.sql @@ -1,7 +1,7 @@ /* contrib/pg_buffercache/pg_buffercache--1.0.sql */ -- Register the function. -CREATE OR REPLACE FUNCTION pg_buffercache_pages() +CREATE FUNCTION pg_buffercache_pages() RETURNS SETOF RECORD AS 'MODULE_PATHNAME', 'pg_buffercache_pages' LANGUAGE C; |