Re: DDL from psql console?

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: DDL from psql console?
Дата
Msg-id 1114443709.13303.91.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на DDL from psql console?  (John Browne <jkbrowne@gmail.com>)
Список pgsql-general
On Mon, 2005-04-25 at 10:29, John Browne wrote:
> Hello,
>
> I was curious if there was a way to get the DDL for a particular table
> from the psql client console?  I have two postgres boxes (development
> and production) and would like to copy & paste the DDL "CREATE TABLE"
> statements from the development console to the production console when
> I'm moving a particular table definition over.  I tried \dt+ but it
> didn't appear to show it.

I don't think you can get it from within psql, but you can get it with
pg_dump from the command line:

pg_dump -st tablename dbname

В списке pgsql-general по дате отправления:

Предыдущее
От: Thomas F.O'Connell
Дата:
Сообщение: Re: DDL from psql console?
Следующее
От: John Browne
Дата:
Сообщение: Re: DDL from psql console?