Use of CREATE OR REPLACE in bloom--1.0.sql

Started by Andreas Karlssonover 9 years ago2 messages
#1Andreas Karlsson
andreas.karlsson@percona.com
1 attachment(s)

Hi,

I do not think that extension SQL scripts should be using CREATE OR
REPLACE FUNCTION like bloom--1.0.sql currently does. I suspect that this
might just be a typo.

I have attached the tiny patch which fixes this.

Andreas

Attachments:

bloom-corfunc-v1.patchtext/x-patch; name=bloom-corfunc-v1.patchDownload
diff --git a/contrib/bloom/bloom--1.0.sql b/contrib/bloom/bloom--1.0.sql
index 87b5442..132a550 100644
--- a/contrib/bloom/bloom--1.0.sql
+++ b/contrib/bloom/bloom--1.0.sql
@@ -1,4 +1,4 @@
-CREATE OR REPLACE FUNCTION blhandler(internal)
+CREATE FUNCTION blhandler(internal)
 RETURNS index_am_handler
 AS 'MODULE_PATHNAME'
 LANGUAGE C;
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Karlsson (#1)
Re: Use of CREATE OR REPLACE in bloom--1.0.sql

Andreas Karlsson <andreas@proxel.se> writes:

I do not think that extension SQL scripts should be using CREATE OR
REPLACE FUNCTION like bloom--1.0.sql currently does. I suspect that this
might just be a typo.

It's definitely a bug. Grepping around found another instance in
sslinfo, and I also noticed the lack of a standard header on this
script and others. Pushed, thanks for noticing that!

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers