SELECT c2.relname
FROM pg_class c, pg_class c2, pg_index i
WHERE c.relname = 'rms_users' AND c.oid = i.indrelid AND i.indexrelid =
c2.oid
AND i.indisprimary AND i.indisunique ORDER BY c2.relname
Robert Treat
On Fri, 2002-10-18 at 12:37, Roberto (SmartBit) wrote:
> Hi all
>
> how could I do a single select resulting a list of field name that are
> primary keys of a table??
>
> please, help me
>
> tia
>
> Roberto Amorim
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly