2009/12/18 suzhiyang <[email protected]>

> How could I get the relkind of a table(view) by its name from pg_class?
>

pg_class is (quite logically) UNIQUE on (relname, relnamespace)

SELECT c.relkind from pg_class c, pg_namespace n
where c.relnamespace = n.oid
and c.relname = 'thetable'
and n.nspname = 'theschema'



-- 
Filip Rembiałkowski
JID,mailto:[email protected]
http://filip.rembialkowski.net/

Reply via email to