On Wed, 16 Jul 2003, Reynard Hilman wrote:
>
> Hi,
>
> Is it possible to do the equivalent of "\d table_name" in psql with php
> pgsql client library?
> Basically I just need to know the primary keys of a table, if any.
run 'psql -E dbname' from the command line, then \d table. Now pick out
the query displayed that seems to be the right one and issue it from php.
It's a little inobvious and even cumbersom, but also kinda cool to see
what the psql client does when you type \d tablename.