Re: Getting source code for database objects

Поиск
Список
Период
Сортировка
От Tino Wildenhain
Тема Re: Getting source code for database objects
Дата
Msg-id 48745386.7050507@wildenhain.de
обсуждение исходный текст
Ответ на Getting source code for database objects  (Artacus <artacus@comcast.net>)
Ответы Re: Getting source code for database objects  (Artacus <artacus@comcast.net>)
Список pgsql-general
Artacus wrote:
> On pgadmin, when you click on a table or function, you get the source
> code (DDL) to create that table or function.
>
> I want to take that and check it into subversion so I have one file for
> each table, function, view, etc. My question is, how do you get that
> source code? I've been playing with pgadmin and wireshark trying to
> figure out what commands or queries it is using to no avail.

Easier would be just uing pg_dump -s >schema.sql to get all schema objects
so you could check them into subversion. If you want only specific
objects, pg_dump -l >listofobjects, then edit this list as you
like and use pg_dump -L listofobjects >someobjects.sql

This should get you going.

Cheers
Tino

Вложения

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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: array sort for varchar arrays?
Следующее
От: Artacus
Дата:
Сообщение: Re: array sort for varchar arrays?