summaryrefslogtreecommitdiff
path: root/contrib/spi/moddatetime--1.0.sql
diff options
context:
space:
mode:
authorTom Lane2011-02-14 02:24:14 +0000
committerTom Lane2011-02-14 03:54:52 +0000
commit029fac2264101919b65fb6319bb994f941969471 (patch)
treeedb89110508318a04730a7caa42d312e050ef7ce /contrib/spi/moddatetime--1.0.sql
parent629b3af27d5c2bc9d6e16b22b943ad651d4ecb56 (diff)
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/spi/moddatetime--1.0.sql')
-rw-r--r--contrib/spi/moddatetime--1.0.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/spi/moddatetime--1.0.sql b/contrib/spi/moddatetime--1.0.sql
index 00971c9fe1..97cc63289f 100644
--- a/contrib/spi/moddatetime--1.0.sql
+++ b/contrib/spi/moddatetime--1.0.sql
@@ -1,6 +1,6 @@
/* contrib/spi/moddatetime--1.0.sql */
-CREATE OR REPLACE FUNCTION moddatetime()
+CREATE FUNCTION moddatetime()
RETURNS trigger
AS 'MODULE_PATHNAME'
LANGUAGE C;