|
4 | 4 | *
|
5 | 5 | * Copyright (c) 2003-2006, PostgreSQL Global Development Group
|
6 | 6 | *
|
7 |
| - * $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.33 2006/04/02 17:38:13 petere Exp $ |
| 7 | + * $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.34 2006/09/04 21:03:18 momjian Exp $ |
8 | 8 | */
|
9 | 9 |
|
10 | 10 | /*
|
@@ -644,7 +644,7 @@ CREATE VIEW columns AS
|
644 | 644 | WHEREa.attrelid=c.oid
|
645 | 645 | ANDa.atttypid=t.oid
|
646 | 646 | ANDnc.oid=c.relnamespace
|
647 |
| - |
| 647 | +AND (nc.nspname NOTLIKE'pg!_temp!_%' ESCAPE'!'ORpg_catalog.pg_table_is_visible(c.oid)) |
648 | 648 | ANDa.attnum>0AND NOTa.attisdroppedANDc.relkindin ('r','v')
|
649 | 649 |
|
650 | 650 | AND (pg_has_role(c.relowner,'USAGE')
|
@@ -933,6 +933,7 @@ CREATE VIEW key_column_usage AS
|
933 | 933 | ANDnc.oid=c.connamespace
|
934 | 934 | ANDc.contypeIN ('p','u','f')
|
935 | 935 | ANDr.relkind='r'
|
| 936 | +AND (nr.nspname NOTLIKE'pg!_temp!_%' ESCAPE'!'ORpg_catalog.pg_table_is_visible(r.oid)) |
936 | 937 | AND (pg_has_role(r.relowner,'USAGE')
|
937 | 938 | OR has_table_privilege(c.oid,'SELECT')
|
938 | 939 | OR has_table_privilege(c.oid,'INSERT')
|
@@ -1459,7 +1460,8 @@ CREATE VIEW sequences AS
|
1459 | 1460 | CAST(nullAS character_data)AS cycle_option-- FIXME
|
1460 | 1461 | FROM pg_namespace nc, pg_class c
|
1461 | 1462 | WHEREc.relnamespace=nc.oid
|
1462 |
| -ANDc.relkind='s' |
| 1463 | +ANDc.relkind='S' |
| 1464 | +AND (nc.nspname NOTLIKE'pg!_temp!_%' ESCAPE'!'ORpg_catalog.pg_table_is_visible(c.oid)) |
1463 | 1465 | AND (pg_has_role(c.relowner,'USAGE')
|
1464 | 1466 | OR has_table_privilege(c.oid,'SELECT')
|
1465 | 1467 | OR has_table_privilege(c.oid,'UPDATE') );
|
@@ -1690,6 +1692,7 @@ CREATE VIEW table_constraints AS
|
1690 | 1692 | WHEREnc.oid=c.connamespaceANDnr.oid=r.relnamespace
|
1691 | 1693 | ANDc.conrelid=r.oid
|
1692 | 1694 | ANDr.relkind='r'
|
| 1695 | +AND (nr.nspname NOTLIKE'pg!_temp!_%' ESCAPE'!'ORpg_catalog.pg_table_is_visible(r.oid)) |
1693 | 1696 | AND (pg_has_role(r.relowner,'USAGE')
|
1694 | 1697 | -- SELECT privilege omitted, per SQL standard
|
1695 | 1698 | OR has_table_privilege(r.oid,'INSERT')
|
@@ -1723,6 +1726,7 @@ CREATE VIEW table_constraints AS
|
1723 | 1726 | ANDa.attnum>0
|
1724 | 1727 | AND NOTa.attisdropped
|
1725 | 1728 | ANDr.relkind='r'
|
| 1729 | +AND (nr.nspname NOTLIKE'pg!_temp!_%' ESCAPE'!'ORpg_catalog.pg_table_is_visible(r.oid)) |
1726 | 1730 | AND (pg_has_role(r.relowner,'USAGE')
|
1727 | 1731 | OR has_table_privilege(r.oid,'SELECT')
|
1728 | 1732 | OR has_table_privilege(r.oid,'INSERT')
|
@@ -1824,6 +1828,7 @@ CREATE VIEW tables AS
|
1824 | 1828 |
|
1825 | 1829 | WHEREc.relnamespace=nc.oid
|
1826 | 1830 | ANDc.relkindIN ('r','v')
|
| 1831 | +AND (nc.nspname NOTLIKE'pg!_temp!_%' ESCAPE'!'ORpg_catalog.pg_table_is_visible(c.oid)) |
1827 | 1832 | AND (pg_has_role(c.relowner,'USAGE')
|
1828 | 1833 | OR has_table_privilege(c.oid,'SELECT')
|
1829 | 1834 | OR has_table_privilege(c.oid,'INSERT')
|
@@ -1945,6 +1950,7 @@ CREATE VIEW triggers AS
|
1945 | 1950 | ANDc.oid=t.tgrelid
|
1946 | 1951 | ANDt.tgtype &em.num<>0
|
1947 | 1952 | AND NOTt.tgisconstraint
|
| 1953 | +AND (n.nspname NOTLIKE'pg!_temp!_%' ESCAPE'!'ORpg_catalog.pg_table_is_visible(c.oid)) |
1948 | 1954 | AND (pg_has_role(c.relowner,'USAGE')
|
1949 | 1955 | -- SELECT privilege omitted, per SQL standard
|
1950 | 1956 | OR has_table_privilege(c.oid,'INSERT')
|
@@ -2143,6 +2149,7 @@ CREATE VIEW views AS
|
2143 | 2149 |
|
2144 | 2150 | WHEREc.relnamespace=nc.oid
|
2145 | 2151 | ANDc.relkind='v'
|
| 2152 | +AND (nc.nspname NOTLIKE'pg!_temp!_%' ESCAPE'!'ORpg_catalog.pg_table_is_visible(c.oid)) |
2146 | 2153 | AND (pg_has_role(c.relowner,'USAGE')
|
2147 | 2154 | OR has_table_privilege(c.oid,'SELECT')
|
2148 | 2155 | OR has_table_privilege(c.oid,'INSERT')
|
|