Get object creation sql script in psql client

From: Igor Katson <descentspb(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Get object creation sql script in psql client
Date: 2009-01-20 11:05:56
Message-ID: 4975B014.1080709@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
);

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2009-01-20 11:07:39 Re: Get object creation sql script in psql client
Previous Message Andreas Wenk 2009-01-20 10:27:55 Re: import sql dump with psql - language creation throws error