From: Guillaume Lelarge <guillaume@lelarge.info>
To: B.Rathmann <B.Rathmann@ping.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: Looking for a "show create table <name>" equivalent
Date: Thu, 14 Jul 2011 00:16:06 +0200
Message-ID: <1310595366.3546.3.camel@laptop> (raw)
In-Reply-To: <4E1C06BD.5080606@ping.de>
References: <4E1C06BD.5080606@ping.de>
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.infohttp://www.dalibo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: guillaume@lelarge.info, B.Rathmann@ping.de
Subject: Re: Looking for a "show create table <name>" equivalent
In-Reply-To: <1310595366.3546.3.camel@laptop>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox