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

From B.Rathmann
Subject Looking for a "show create table " equivalent
Date
Msg-id 4E1C06BD.5080606@ping.de
Whole thread Raw
Responses Re: Looking for a "show create table " equivalent  (Guillaume Lelarge <guillaume@lelarge.info>)
Re: Looking for a "show create table " equivalent  (Wes James <comptekki@gmail.com>)
Re: Looking for a "show create table " equivalent  (Wes James <comptekki@gmail.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Gavin Flower
Date:
Subject: Re: using explain output within pgsql
Next
From: Jose Ig Mendez
Date:
Subject: newbie question * compare integer in a "where IN" statement