From 029fac2264101919b65fb6319bb994f941969471 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 13 Feb 2011 21:24:14 -0500 Subject: 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. --- contrib/pg_buffercache/pg_buffercache--1.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/pg_buffercache') 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; -- cgit v1.2.1