2009/12/18 suzhiyang <suzhiyang(at)gmail(dot)com>
> 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:filip(dot)rembialkowski(at)gmail(dot)com
http://filip.rembialkowski.net/