How to identify primary key
| From: | Scot L. Harris | Date: | Tue, 01 Jun 2004 19:04:17 +0000 |
| Subject: | How to identify primary key | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-34620@lists.php.net to get a copy of this message | ||
Using PHP 4.2.2 and postgresql 7.2.4.
Trying to find a way to identify the primary key of a table given just
the tables name.
Been looking through the system tables but have not figured out some of
the relationships between pg_attribute, pg_class and some of the others.
Found a reference to a pg_get_indexdef() function but the details were
less than complete.
So is there nice way to get this information?
--
Scot L. Harris <webid@cfl.rr.com>