Re: sql syntax to replace desc - Mailing list pgsql-general

From Martin Gainty
Subject Re: sql syntax to replace desc
Date
Msg-id BLU142-W12E437872C95C2694EEE0AAEC70@phx.gbl
Whole thread Raw
In response to sql syntax to replace desc  (hendra kusuma <penguinroad@gmail.com>)
List pgsql-general
information_schema.table_name contains the tables information..make sure yuo select type BASE TABLE
and make sure the schema is not from either catalog or information_schema e.g.

SELECT table_name FROM information_schema.tables WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema')

HTH
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.





Date: Sat, 31 Jan 2009 09:20:27 +0700
Subject: [GENERAL] sql syntax to replace desc
From: penguinroad@gmail.com
To: pgsql-general@postgresql.org

Dear all,

I need to see my table structure complete with it's constraint (at least primary key, foreign key, not null, unique)
In oracle or mysql, I usually use desc table_name to achieve such result
But I find from pgsql-doc that desc isn't implemented.

Does anyone know some sql syntax to do that?

I'm not talking about \d option at psql console since I need that data
to be called from programming language such as PHP and Ruby

Thank you
Regards
Hendra


Windows Live™ Hotmail®…more than just e-mail. See how it works.

pgsql-general by date:

Previous
From: Richard Broersma
Date:
Subject: Re: sql syntax to replace desc
Next
From: Octavio Alvarez
Date:
Subject: Re: Pet Peeves?