From: B.Rathmann <B.Rathmann@ping.de>
To: pgsql-sql@postgresql.org
Subject: Looking for a "show create table <name>" equivalent
Date: 12 Jul 2011 10:33:01 +0200
Message-ID: <4E1C06BD.5080606@ping.de> (raw)
Hello,
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?
E.g. MySQL offers a simple "show create table <name>". I am using
Postgresql 9.0.4 on Gentoo.
Thanks for your help (if there is any documentation which I haven't
found yet, just point me to it).
Sincerely
Bettina
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: B.Rathmann@ping.de
Subject: Re: Looking for a "show create table <name>" equivalent
In-Reply-To: <4E1C06BD.5080606@ping.de>
* 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