Re: Postgres schema comparison. - Mailing list pgsql-admin

From John DeSoi
Subject Re: Postgres schema comparison.
Date
Msg-id 1098CCF1-8F1E-11D9-A12B-000A95B03262@pgedit.com
Whole thread Raw
In response to Re: Postgres schema comparison.  (Stef <svb@ucs.co.za>)
Responses Re: [SOLVED] Postgres schema comparison.  (Stef <svb@ucs.co.za>)
List pgsql-admin
On Mar 7, 2005, at 10:09 AM, Stef wrote:

> Is it possible to somehow pass the output of : "\d [TABLE NAME]"
> to this function? If not, what would return me consistent text
> that will describe the columns, indexes and primary keys of a table?
>

I'm not sure you can use \d directly, but if you startup psql with the
-E option it will show you all the SQL it is using to run the \d
command. It should be fairly easy to get the strings you need from the
results of running a similar query. The psql source is a good place to
look also.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


pgsql-admin by date:

Previous
From: Stef
Date:
Subject: Re: [SQL] Postgres schema comparison.
Next
From: Gourish Singbal
Date:
Subject: Backup procedure