Re: Generate SQL Statements

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: Generate SQL Statements
Дата
Msg-id 4845DD83.10500@pinpointresearch.com
обсуждение исходный текст
Ответ на Generate SQL Statements  (Terry Lee Tucker <terry@chosen-ones.org>)
Ответы Re: Generate SQL Statements  (Terry Lee Tucker <terry@chosen-ones.org>)
Список pgsql-general
Terry Lee Tucker wrote:
> Greetings:
>
> I was wondering if anyone knows of a third party product that will generate
> SQL statements for creating existing tables. We have to provide table
> definition statements for out parent company. Any ideas?
>
Why 3rd party? How about:

pg_dump --schema-only -t table_name... ?

Alternately, roll-your-own using the system tables. A good place to
start is by running psql with the --echo-queries option to see the
queries it runs "behind the scenes". You can read the queries for things
like "\d+ tablename" then modify them to suit.

Cheers,
Steve


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

Предыдущее
От: Terry Lee Tucker
Дата:
Сообщение: Generate SQL Statements
Следующее
От: Klint Gore
Дата:
Сообщение: Re: does postgresql works on distributed systems?