how to get table information from php client ?

Поиск
Список
Период
Сортировка
Искать

how to get table information from php client ?

От:
Reynard Hilman <reynardmh@lightsky.com>
Дата:

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.

thanks,
- reynard


Re: how to get table information from php client ?

От:
"scott.marlowe" <scott.marlowe@ihs.com>
Дата:
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.

FAQ