Re: pg view of table columns needed for scripting

From: bricklen <bricklen(at)gmail(dot)com>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg view of table columns needed for scripting
Date: 2010-10-22 16:38:34
Message-ID: AANLkTikF=r_MmU5aG-xxtMb+OegJJL0b69o5x5gCLQhx@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Oct 22, 2010 at 9:14 AM, Gauthier, Dave <dave(dot)gauthier(at)intel(dot)com> wrote:
> Is there something like a pg_xxx view that I can use to get the column names
> and data types of a table, similar to what I see with \d ?  I need to run
> this is a script, so \d isn't viable.  I did a \df and looked around, but
> nothing popped out.

psql -E -d dbname

Will give you the internal queries that are executed by things like \d etc

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Barnes 2010-10-22 16:50:16 Re: pg view of table columns needed for scripting
Previous Message Peter Bex 2010-10-22 16:27:17 Re: Advice needed on application/database authentication/authorization/auditing model