|
4 | 4 | *
|
5 | 5 | * Copyright (c) 2003-2009, PostgreSQL Global Development Group
|
6 | 6 | *
|
7 |
| - * $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.51 2009/02/06 21:15:11 tgl Exp $ |
| 7 | + * $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.52 2009/02/14 20:48:36 tgl Exp $ |
8 | 8 | */
|
9 | 9 |
|
10 | 10 | /*
|
@@ -40,17 +40,9 @@ CREATE FUNCTION _pg_expandarray(IN anyarray, OUT x anyelement, OUT n int)
|
40 | 40 | pg_catalog.array_upper($1,1),
|
41 | 41 | 1) as g(s)';
|
42 | 42 |
|
43 |
| -CREATE FUNCTION _pg_keyissubset(smallint[], smallint[]) RETURNS boolean |
44 |
| - LANGUAGE sql |
45 |
| - IMMUTABLE |
46 |
| - RETURNS NULL ON NULL INPUT |
47 |
| - AS 'select $1[1] is null or ($1[1] = any ($2) and coalesce(information_schema._pg_keyissubset($1[2:pg_catalog.array_upper($1,1)], $2), true))'; |
48 |
| - |
49 | 43 | CREATE FUNCTION _pg_keysequal(smallint[], smallint[]) RETURNS boolean
|
50 |
| - LANGUAGE sql |
51 |
| - IMMUTABLE |
52 |
| - RETURNS NULL ON NULL INPUT |
53 |
| - AS 'select information_schema._pg_keyissubset($1, $2) and information_schema._pg_keyissubset($2, $1)'; |
| 44 | + LANGUAGE sql IMMUTABLE -- intentionally not STRICT, to allow inlining |
| 45 | + AS 'select $1 <@ $2 and $2 <@ $1'; |
54 | 46 |
|
55 | 47 | /* Get the OID of the unique index that an FK constraint depends on */
|
56 | 48 | CREATE FUNCTION _pg_underlying_index(oid) RETURNS oid
|
@@ -1793,7 +1785,7 @@ CREATE VIEW table_constraints AS
|
1793 | 1785 | OR has_table_privilege(r.oid, 'INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER')
|
1794 | 1786 | OR has_any_column_privilege(r.oid, 'INSERT, UPDATE, REFERENCES') )
|
1795 | 1787 |
|
1796 |
| - UNION |
| 1788 | + UNION ALL |
1797 | 1789 |
|
1798 | 1790 | -- not-null constraints
|
1799 | 1791 |
|
|
0 commit comments