Created
October 9, 2012 07:49
-
-
Save np422/3857234 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
c.relhasrules, | |
c.relkind, | |
c.relhasoids, | |
c.relname, | |
u.nspname | |
from | |
pg_catalog.pg_namespace u, | |
pg_catalog.pg_class c | |
where | |
u.oid =c.relnamespace and | |
c.relname = 'sm_param' and | |
u.nspname = 'sm_owner'; | |
-- Table "pg_catalog.pg_namespace" | |
-- Column | Type | Modifiers | |
-- ------------------+-----------+----------- | |
-- nspname | name | not null -- Name of the namespace | |
-- Table "pg_catalog.pg_class" | |
-- Column | Type | Modifiers | |
-- ------------------+-----------+----------- | |
-- relname | name | not null -- Name of the table, index, view, etc. | |
-- relhasrules | boolean | not null -- True if table has (or once had) rules; | |
-- relkind | "char" | not null -- r = ordinary table, i = index, S = sequence, v = view, c = composite type, t = TOAST table, f = foreign table | |
-- relhasoids | boolean | not null -- True if we generate an OID for each row of the relation | |
-- relnamespace | oid | not null -- The OID of the namespace that contains this relation , pg_namespace.oid | |
-- xtest=# select c.relhasrules, c.relkind, c.relhasoids, c.relname, u.nspname from | |
-- pg_catalog.pg_namespace u, pg_catalog.pg_class c where u.oid =c.relnamespace | |
-- and c.relname = 'sm_param' and u.nspname = 'centralen'; | |
-- relhasrules | relkind | relhasoids | relname | nspname | |
-- -------------+---------+------------+---------+--------- | |
-- (0 rows) | |
-- xtest=# select c.relhasrules, c.relkind, c.relhasoids, c.relname, u.nspname from | |
-- pg_catalog.pg_namespace u, pg_catalog.pg_class c where u.oid =c.relnamespace | |
-- and c.relname = 'sm_param' and u.nspname = 'sm_owner'; | |
-- relhasrules | relkind | relhasoids | relname | nspname | |
-- -------------+---------+------------+----------+---------- | |
-- f | r | f | sm_param | sm_owner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment