Scripting Functions to Separate Files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Scripting Functions to Separate Files

Mike Fahrenkrog
Scripting Functions to Separate Files

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


Reply | Threaded
Open this post in threaded view
|

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.




---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq