Skip site navigation (1) Skip section navigation (2)

sql syntax to replace desc

From: hendra kusuma <penguinroad(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: sql syntax to replace desc
Date: 2009-01-31 02:20:27
Message-ID: 26dadb3d0901301820x38e5ab59hc75c3b0e5967537@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
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

Responses

pgsql-general by date

Next:From: Richard BroersmaDate: 2009-01-31 02:34:40
Subject: Re: sql syntax to replace desc
Previous:From: rhubbellDate: 2009-01-30 23:44:48
Subject: Re: Pet Peeves?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group