Re: describe table query? - Mailing list pgsql-general

From Darren Ferguson
Subject Re: describe table query?
Date
Msg-id Pine.LNX.4.44.0209091815200.15136-100000@thread.crystalballinc.com
Whole thread Raw
In response to describe table query?  (Andrew Bulmer <toastafari@yahoo.com>)
List pgsql-general
Start psql with -E and then run the \d tablename. This will give you the
query that is run to get the fields from the table.

Darren
On Mon, 9 Sep 2002, Andrew Bulmer wrote:

> I'm trying to write an Access clone in java that will
> use PostGres as a backend. Problem is, I need to be
> able to list all the fields (and data types) in a
> table. I know about "\d" but that only seems to work
> on the command line client (doesn't work if I pass it
> in as a query). I know in mysql DESCRIBE <table> will
> do it... is there an equivalent in postgres? I tried
> google but all I could find were references to the \d command.
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>

--
Darren Ferguson


pgsql-general by date:

Previous
From: Andrew Bulmer
Date:
Subject: describe table query?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Creating tons of tables to support a query