Обсуждение: Scripting Functions to Separate Files

Поиск
Список
Период
Сортировка

Scripting Functions to Separate Files

От
"Mike Fahrenkrog"
Дата:

Hi,
Does anyone know an efficient way to script database objects (preferably all objects, but particularly functions) to separate files? I would like to have a separate file for each object, so that I can easily add them to source control.

Thanks,
--Mike

Re: Scripting Functions to Separate Files

От
Tino Wildenhain
Дата:
Am Mittwoch, den 06.07.2005, 11:35 -0700 schrieb Mike Fahrenkrog:
> Hi,
> Does anyone know an efficient way to script database objects
> (preferably all objects, but particularly functions) to separate
> files? I would like to have a separate file for each object, so that I
> can easily add them to source control.
>
Yes, you simply use a text editor and write the files.
You use psql yourdb <small_file_for_one_object
to create/modify your objects after you edit them.