| From: | Steve Atkins <steve(at)blighty(dot)com> |
|---|---|
| To: | |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Getting table attributes |
| Date: | 2004-02-06 17:18:11 |
| Message-ID: | 20040206171811.GA701@gp.word-to-the-wise.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Fri, Feb 06, 2004 at 04:53:47PM +0000, C G wrote:
>
> I'm trying to get a table containing all the user created tables, which
> contains the column name and their types. Basically, I want to be able to
> do "\d all_user_tables" - but I can't use the \d notation.
>
> I tried to combine the pg_ tables, but I couldn't get what I wanted (due to
> my lack of skill).
>
> Any ideas?
If you start psql with the -E flag then it'll show you the SQL query
it generates for the various \commands as you run them.
If you're using a recent version of postgres you can probably find the
data in a more version-independent way within information_schema, but I've
not played with that yet.
Cheers,
Steve
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Franco Bruno Borghesi | 2004-02-06 17:27:45 | Re: Getting table attributes |
| Previous Message | Joe Conway | 2004-02-06 17:17:04 | Re: Casting 'record' to a composite type. |