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: sql syntax to replace desc From: penguinroad@xxxxxxxxx To: pgsql-general@xxxxxxxxxxxxxx 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. |