Re: [PHP-DB] How to identify primary key

2004-06-01 Thread Ross Honniball
May not be of any use as I know nothing about postgresql, but if it happens 
to be remotely related to mysql then this may help.

In Mysql : SHOW COLUMNS FROM table-name
Regards .. Ross
At 05:04 AM 2/06/2004, you wrote:
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 <[EMAIL PROTECTED]>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
. Ross Honniball. JCU Bookshop Cairns, Qld, Australia.
.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] How to identify primary key

2004-06-01 Thread Scot L. Harris
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 <[EMAIL PROTECTED]>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php