From: Tom Lane <tgl@sss.pgh.pa.us>
To: Erik Jones <erik@myemma.com>
Cc: danap@dandymadeproductions.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Describe Table
Date: Mon, 17 Dec 2007 13:03:20 -0500
Message-ID: <22677.1197914600@sss.pgh.pa.us> (raw)
In-Reply-To: <AB0DA566-22CA-4D99-B743-F87516E70FDD@myemma.com>
References: <20071217165211.E18222E3202@postgresql.org>
<AB0DA566-22CA-4D99-B743-F87516E70FDD@myemma.com>
Erik Jones <erik@myemma.com> writes:
> <danap@dandymadeproductions.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, erik@myemma.com, danap@dandymadeproductions.com
Subject: Re: Describe Table
In-Reply-To: <22677.1197914600@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox