Re: Looking for a "show create table <name>" equivalent

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: "B(dot)Rathmann" <B(dot)Rathmann(at)ping(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Looking for a "show create table <name>" equivalent
Date: 2011-07-13 22:16:06
Message-ID: 1310595366.3546.3.camel@laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Wes James 2011-07-13 22:38:31 Re: Looking for a "show create table <name>" equivalent
Previous Message Kevin Crain 2011-07-13 18:20:33 Re: Max column number.