@@ -68,7 +68,23 @@ ALTER EXTENSION intarray ADD operator class gist__intbig_ops using gist;
68
68
ALTER EXTENSION intarray ADD operator family gin__int_ops using gin;
69
69
ALTER EXTENSION intarray ADD operator class gin__int_ops using gin;
70
70
71
- -- these two functions have different signatures in 9.1, but we don't
72
- -- bother trying to fix them because GIN doesn't care much
71
+ -- These functions had different signatures in 9.0. We can't just
72
+ -- drop and recreate them because they are linked into the GIN opclass,
73
+ -- so we need some ugly hacks.
74
+
75
+ -- First, absorb them into the extension under their old identities.
76
+
73
77
ALTER EXTENSION intarray ADD function ginint4_queryextract(internal,internal,smallint ,internal,internal);
74
78
ALTER EXTENSION intarray ADD function ginint4_consistent(internal,smallint ,internal,integer ,internal,internal);
79
+
80
+ -- Next, fix the parameter lists by means of direct UPDATE on the pg_proc
81
+ -- entries. This is ugly as can be, but there's no other way to do it
82
+ -- while preserving the identities (OIDs) of the functions.
83
+
84
+ UPDATE pg_catalog .pg_proc
85
+ SET pronargs = 7 , proargtypes = ' 2281 2281 21 2281 2281 2281 2281'
86
+ WHERE oid = ' ginint4_queryextract(internal,internal,smallint,internal,internal)' ::pg_catalog .regprocedure ;
87
+
88
+ UPDATE pg_catalog .pg_proc
89
+ SET pronargs = 8 , proargtypes = ' 2281 21 2281 23 2281 2281 2281 2281'
90
+ WHERE oid = ' ginint4_consistent(internal,smallint,internal,integer,internal,internal)' ::pg_catalog .regprocedure ;
0 commit comments