1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Tom Lane
2011-02-13 21:24:14 -05:00
parent 629b3af27d
commit 029fac2264
37 changed files with 922 additions and 922 deletions

View File

@ -4,12 +4,12 @@
-- Input and output functions and the type itself:
--
CREATE OR REPLACE FUNCTION chkpass_in(cstring)
CREATE FUNCTION chkpass_in(cstring)
RETURNS chkpass
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE OR REPLACE FUNCTION chkpass_out(chkpass)
CREATE FUNCTION chkpass_out(chkpass)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -20,7 +20,7 @@ CREATE TYPE chkpass (
output = chkpass_out
);
CREATE OR REPLACE FUNCTION raw(chkpass)
CREATE FUNCTION raw(chkpass)
RETURNS text
AS 'MODULE_PATHNAME', 'chkpass_rout'
LANGUAGE C STRICT;
@ -29,12 +29,12 @@ CREATE OR REPLACE FUNCTION raw(chkpass)
-- The various boolean tests:
--
CREATE OR REPLACE FUNCTION eq(chkpass, text)
CREATE FUNCTION eq(chkpass, text)
RETURNS bool
AS 'MODULE_PATHNAME', 'chkpass_eq'
LANGUAGE C STRICT;
CREATE OR REPLACE FUNCTION ne(chkpass, text)
CREATE FUNCTION ne(chkpass, text)
RETURNS bool
AS 'MODULE_PATHNAME', 'chkpass_ne'
LANGUAGE C STRICT;