Re: how to get table information from php client ?

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Reynard Hilman <reynardmh(at)lightsky(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: how to get table information from php client ?
Date: 2003-07-16 16:11:03
Message-ID: Pine.LNX.4.33.0307161010050.29770-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-07-16 16:13:48 Re: Postgresql "FIFO" Tables, How-To ?
Previous Message Nigel J. Andrews 2003-07-16 16:06:11 Re: Postgresql "FIFO" Tables, How-To ?