| From: | Darren Ferguson <darren(at)crystalballinc(dot)com> |
|---|---|
| To: | Andrew Bulmer <toastafari(at)yahoo(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: describe table query? |
| Date: | 2002-09-09 22:15:57 |
| Message-ID: | Pine.LNX.4.44.0209091815200.15136-100000@thread.crystalballinc.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)postgresql(dot)org)
>
--
Darren Ferguson
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Martijn van Oosterhout | 2002-09-09 23:34:19 | Re: Creating tons of tables to support a query |
| Previous Message | Andrew Bulmer | 2002-09-09 21:30:02 | describe table query? |