1 /* contrib/btree_gist/btree_gist--1.1--1.2.sql */
3 -- complain if script is sourced in psql, rather than via ALTER EXTENSION
4 \echo Use "ALTER EXTENSION btree_gist UPDATE TO '1.2'" to load this file. \quit
6 -- Update procedure signatures the hard way.
7 -- We use to_regprocedure() so that query doesn't fail if run against 9.6beta1 definitions,
8 -- wherein the signatures have been updated already. In that case to_regprocedure() will
9 -- return NULL and no updates will happen.
11 UPDATE pg_catalog.pg_proc SET
12 proargtypes = pg_catalog.array_to_string(newtypes::pg_catalog.oid[], ' ')::pg_catalog.oidvector,
13 pronargs = pg_catalog.array_length(newtypes, 1)
15 (NULL::pg_catalog.text, NULL::pg_catalog.regtype[]), -- establish column types
16 ('gbt_oid_distance(internal,oid,int2,oid)', '{internal,oid,int2,oid,internal}'),
17 ('gbt_oid_union(bytea,internal)', '{internal,internal}'),
18 ('gbt_oid_same(internal,internal,internal)', '{gbtreekey8,gbtreekey8,internal}'),
19 ('gbt_int2_distance(internal,int2,int2,oid)', '{internal,int2,int2,oid,internal}'),
20 ('gbt_int2_union(bytea,internal)', '{internal,internal}'),
21 ('gbt_int2_same(internal,internal,internal)', '{gbtreekey4,gbtreekey4,internal}'),
22 ('gbt_int4_distance(internal,int4,int2,oid)', '{internal,int4,int2,oid,internal}'),
23 ('gbt_int4_union(bytea,internal)', '{internal,internal}'),
24 ('gbt_int4_same(internal,internal,internal)', '{gbtreekey8,gbtreekey8,internal}'),
25 ('gbt_int8_distance(internal,int8,int2,oid)', '{internal,int8,int2,oid,internal}'),
26 ('gbt_int8_union(bytea,internal)', '{internal,internal}'),
27 ('gbt_int8_same(internal,internal,internal)', '{gbtreekey16,gbtreekey16,internal}'),
28 ('gbt_float4_distance(internal,float4,int2,oid)', '{internal,float4,int2,oid,internal}'),
29 ('gbt_float4_union(bytea,internal)', '{internal,internal}'),
30 ('gbt_float4_same(internal,internal,internal)', '{gbtreekey8,gbtreekey8,internal}'),
31 ('gbt_float8_distance(internal,float8,int2,oid)', '{internal,float8,int2,oid,internal}'),
32 ('gbt_float8_union(bytea,internal)', '{internal,internal}'),
33 ('gbt_float8_same(internal,internal,internal)', '{gbtreekey16,gbtreekey16,internal}'),
34 ('gbt_ts_distance(internal,timestamp,int2,oid)', '{internal,timestamp,int2,oid,internal}'),
35 ('gbt_tstz_distance(internal,timestamptz,int2,oid)', '{internal,timestamptz,int2,oid,internal}'),
36 ('gbt_ts_union(bytea,internal)', '{internal,internal}'),
37 ('gbt_ts_same(internal,internal,internal)', '{gbtreekey16,gbtreekey16,internal}'),
38 ('gbt_time_distance(internal,time,int2,oid)', '{internal,time,int2,oid,internal}'),
39 ('gbt_time_union(bytea,internal)', '{internal,internal}'),
40 ('gbt_time_same(internal,internal,internal)', '{gbtreekey16,gbtreekey16,internal}'),
41 ('gbt_date_distance(internal,date,int2,oid)', '{internal,date,int2,oid,internal}'),
42 ('gbt_date_union(bytea,internal)', '{internal,internal}'),
43 ('gbt_date_same(internal,internal,internal)', '{gbtreekey8,gbtreekey8,internal}'),
44 ('gbt_intv_distance(internal,interval,int2,oid)', '{internal,interval,int2,oid,internal}'),
45 ('gbt_intv_union(bytea,internal)', '{internal,internal}'),
46 ('gbt_intv_same(internal,internal,internal)', '{gbtreekey32,gbtreekey32,internal}'),
47 ('gbt_cash_distance(internal,money,int2,oid)', '{internal,money,int2,oid,internal}'),
48 ('gbt_cash_union(bytea,internal)', '{internal,internal}'),
49 ('gbt_cash_same(internal,internal,internal)', '{gbtreekey16,gbtreekey16,internal}'),
50 ('gbt_macad_union(bytea,internal)', '{internal,internal}'),
51 ('gbt_macad_same(internal,internal,internal)', '{gbtreekey16,gbtreekey16,internal}'),
52 ('gbt_text_union(bytea,internal)', '{internal,internal}'),
53 ('gbt_text_same(internal,internal,internal)', '{gbtreekey_var,gbtreekey_var,internal}'),
54 ('gbt_bytea_union(bytea,internal)', '{internal,internal}'),
55 ('gbt_bytea_same(internal,internal,internal)', '{gbtreekey_var,gbtreekey_var,internal}'),
56 ('gbt_numeric_union(bytea,internal)', '{internal,internal}'),
57 ('gbt_numeric_same(internal,internal,internal)', '{gbtreekey_var,gbtreekey_var,internal}'),
58 ('gbt_bit_union(bytea,internal)', '{internal,internal}'),
59 ('gbt_bit_same(internal,internal,internal)', '{gbtreekey_var,gbtreekey_var,internal}'),
60 ('gbt_inet_union(bytea,internal)', '{internal,internal}'),
61 ('gbt_inet_same(internal,internal,internal)', '{gbtreekey16,gbtreekey16,internal}')
62 ) AS update_data (oldproc, newtypes)
63 WHERE oid = pg_catalog.to_regprocedure(oldproc);