| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Erik Jones <erik(at)myemma(dot)com> |
| Cc: | danap(at)dandymadeproductions(dot)com, pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Describe Table |
| Date: | 2007-12-17 18:03:20 |
| Message-ID: | 22677.1197914600@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Erik Jones <erik(at)myemma(dot)com> writes:
> <danap(at)dandymadeproductions(dot)com> wrote:
>> I've reviewed much of the documentation and the forums,
>> but unable to seem to find a easy way to obtain the same
>> thing as the 'psql \d table' through sql.
> If you start psql with the -E flag, it will display all sql generated
> by internal commands such as those generated by \d commands.
Another alternative is to run "pg_dump -s -t <table>"; that will get you
a lot closer to SQL-ready output, and you won't need to worry as much
about updating your code for future system catalog changes.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Luigi Pirillo | 2007-12-17 19:30:00 | Insert into and Sequence |
| Previous Message | Richard Broersma Jr | 2007-12-17 17:47:22 | Re: Describe Table |