diff options
Diffstat (limited to 'contrib/intarray')
-rw-r--r-- | contrib/intarray/intarray--unpackaged--1.0.sql | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/intarray/intarray--unpackaged--1.0.sql b/contrib/intarray/intarray--unpackaged--1.0.sql index 238ddfeea1b..5a2829c9f53 100644 --- a/contrib/intarray/intarray--unpackaged--1.0.sql +++ b/contrib/intarray/intarray--unpackaged--1.0.sql @@ -88,3 +88,21 @@ WHERE oid = 'ginint4_queryextract(internal,internal,smallint,internal,internal)' UPDATE pg_catalog.pg_proc SET pronargs = 8, proargtypes = '2281 21 2281 23 2281 2281 2281 2281' WHERE oid = 'ginint4_consistent(internal,smallint,internal,integer,internal,internal)'::pg_catalog.regprocedure; + +-- intarray also relies on the core function ginarrayextract, which changed +-- signature in 9.1. To support upgrading, pg_catalog contains entries +-- for ginarrayextract with both 2 and 3 args, and the former is what would +-- have been added to our opclass during initial restore of a 9.0 dump script. +-- Avert your eyes while we hack the pg_amproc entry to make it link to the +-- 3-arg form ... + +UPDATE pg_catalog.pg_amproc +SET amproc = 'pg_catalog.ginarrayextract(anyarray,internal,internal)'::pg_catalog.regprocedure +WHERE amprocfamily = + (SELECT oid FROM pg_catalog.pg_opfamily WHERE opfname = 'gin__int_ops' AND + opfnamespace = (SELECT oid FROM pg_catalog.pg_namespace + WHERE nspname = pg_catalog.current_schema())) + AND amproclefttype = 'integer[]'::pg_catalog.regtype + AND amprocrighttype = 'integer[]'::pg_catalog.regtype + AND amprocnum = 2 + AND amproc = 'pg_catalog.ginarrayextract(anyarray,internal)'::pg_catalog.regprocedure; |