On 06/09/2016 10:48 PM, Tom Lane wrote:
Robert Haas <robertmh...@gmail.com> writes:
On Sat, May 21, 2016 at 11:45 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
Yes, let's fix it.  This will also take care of the questions about
whether the GIN/GIST opclass tweaks I made a few months ago require
module version bumps.

Tom, there's a patch for this at
https://www.postgresql.org/message-id/574f091a.3050...@proxel.se which
I think you should review, since you were the one who made the tweaks
involved.  Any chance you can do that RSN?

I've pushed this with some revisions to make the queries more
search-path-safe.  I'm not too happy with the safety of the queries
I see already present from the previous patches.  I think stuff
like this:

UPDATE pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::regprocedure;

needs to be more like

UPDATE pg_catalog.pg_proc SET proparallel = 's'
WHERE oid = 'min(citext)'::pg_catalog.regprocedure;

Good point. While I believe that we can trust that ALTER EXTENSION handles the search path for the functions of the extension we should qualify things in pg_catalog.

I have attached a patch which adds the shcema, plus an updated patch for tseach2.

Andreas

Attachment: parallel-contrib-v3-tsearch2.patch.gz
Description: application/gzip

diff --git a/contrib/citext/citext--1.1--1.2.sql b/contrib/citext/citext--1.1--1.2.sql
index 60dd15b..4f0e4bc 100644
--- a/contrib/citext/citext--1.1--1.2.sql
+++ b/contrib/citext/citext--1.1--1.2.sql
@@ -42,13 +42,13 @@ ALTER FUNCTION split_part(citext, citext, int) PARALLEL SAFE;
 ALTER FUNCTION translate(citext, citext, text) PARALLEL SAFE;
 
 UPDATE pg_proc SET proparallel = 's'
-WHERE oid = 'min(citext)'::regprocedure;
+WHERE oid = 'min(citext)'::pg_catalog.regprocedure;
 
 UPDATE pg_proc SET proparallel = 's'
-WHERE oid = 'max(citext)'::regprocedure;
+WHERE oid = 'max(citext)'::pg_catalog.regprocedure;
 
 UPDATE pg_aggregate SET aggcombinefn = 'citext_smaller'
-WHERE aggfnoid = 'max(citext)'::regprocedure;
+WHERE aggfnoid = 'max(citext)'::pg_catalog.regprocedure;
 
 UPDATE pg_aggregate SET aggcombinefn = 'citext_larger'
-WHERE aggfnoid = 'max(citext)'::regprocedure;
+WHERE aggfnoid = 'max(citext)'::pg_catalog.regprocedure;
diff --git a/contrib/intagg/intagg--1.0--1.1.sql b/contrib/intagg/intagg--1.0--1.1.sql
index 2ec95b6..b2a2820 100644
--- a/contrib/intagg/intagg--1.0--1.1.sql
+++ b/contrib/intagg/intagg--1.0--1.1.sql
@@ -8,4 +8,4 @@ ALTER FUNCTION int_agg_final_array(internal) PARALLEL SAFE;
 ALTER FUNCTION int_array_enum(int4[]) PARALLEL SAFE;
 
 UPDATE pg_proc SET proparallel = 's'
-WHERE oid = 'int_array_aggregate(int4)'::regprocedure;
+WHERE oid = 'int_array_aggregate(int4)'::pg_catalog.regprocedure;
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to