Re: Looking for a "show create table " equivalent - Mailing list pgsql-sql

From Guillaume Lelarge
Subject Re: Looking for a "show create table " equivalent
Date
Msg-id 1310595366.3546.3.camel@laptop
Whole thread Raw
In response to Looking for a "show create table " equivalent  ("B.Rathmann" <B.Rathmann@ping.de>)
List pgsql-sql
On Tue, 2011-07-12 at 10:33 +0200, B.Rathmann wrote:
> [...]
> I've been trying to find out how to find out which sql was run to create
> a certain table. As I need this in a program which may access the
> database remotely, using pg_dump --schema-only or psql is not an option
> (the system my program runs on may not even have those tools installed).
> Looking at the source of pgadmin3 it seems as if the program collects
> all info about the given table (columns, indeces etc) and creates the
> needed SQL by itself, is there no easier way?
> 

No. pgAdmin does it this way because it has no other way to do it.


-- 
Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com



pgsql-sql by date:

Previous
From: Kevin Crain
Date:
Subject: Re: Max column number.
Next
From: Wes James
Date:
Subject: Re: Looking for a "show create table " equivalent