Re: Postgres schema comparison.

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Stef <svb(at)ucs(dot)co(dot)za>
Cc: pgsql-ADMIN(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Postgres schema comparison.
Date: 2005-03-07 15:32:07
Message-ID: 1098CCF1-8F1E-11D9-A12B-000A95B03262@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql


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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Goulet, Dick 2005-03-07 15:33:08 Re: Postgres schema comparison.
Previous Message Stef 2005-03-07 15:31:55 Re: [SQL] Postgres schema comparison.

Browse pgsql-sql by date

  From Date Subject
Next Message Goulet, Dick 2005-03-07 15:33:08 Re: Postgres schema comparison.
Previous Message Stef 2005-03-07 15:31:55 Re: [SQL] Postgres schema comparison.