On 2009-01-20, Igor Katson <descent...@gmail.com> wrote:
> Is there a way to get i.e. table creation sql script from an existing 
> table in psql (not postgresql, but psql client), like it is in pgAdmin?
>
> I.e. i point it to existing table 'foo', and it writes:
> CREATE TABLE foo (
>    bar int
> );

pg_dump dbname --table=foo --schema-only

I realise this is not what exactly you asked for, nor does it give the
most efficient SQL for many tables.




-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to