Re: How can I save/load all triggers/stored procedures from a file?

Lists: pgsql-general
From: mihai11(at)mailcity(dot)com (Razvan)
To: pgsql-general(at)postgresql(dot)org
Subject: How can I save/load all triggers/stored procedures from a file?
Date: 2003-03-21 16:05:19
Message-ID: 15f19d61.0303210805.761643b4@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi

Is it possible to save/load all triggers from a text file? That
would really help the development; modifying/reloading a trigger would
be much easier.

Also, how can I see the body of a trigger that is already in
the database? If I do "\d <table_name>" I get the name of the trigger.
What should I do to see the body - I mean what you have typed when you
have created the trigger.

Regards,
Razvan M


From: mihai11(at)mailcity(dot)com (Razvan)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I save/load all triggers/stored procedures from a file?
Date: 2003-04-01 08:32:25
Message-ID: 15f19d61.0304010032.8ba1039@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi

> Is it possible to save/load all triggers from a text file? That
> would really help the development; modifying/reloading a trigger would
> be much easier.

To save just use a text editor - that one was easy:))
To load a text file from psql type \i <file_name> when in interactive mode.

> Also, how can I see the body of a trigger that is already in
> the database? If I do "\d <table_name>" I get the name of the trigger.
> What should I do to see the body - I mean what you have typed when you
> have created the trigger.

Pg_dump would do the job.
Thanks to all who where about to answer.

Regards,
Razvan M


From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I save/load all triggers/stored procedures from a file?
Date: 2003-04-01 09:47:37
Message-ID: b6bn7n$dfl$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Razvan schrieb:
> Hi
>
> Also, how can I see the body of a trigger that is already in the
> database? If I do "\d <table_name>" I get the name of the trigger.
> What should I do to see the body - I mean what you have typed when
> you have created the trigger.

I have just updated my SQL Workbench to support exactly this. It is a
Java based frontend to any JDBC database. It's free and if you want, you
can have a look at www.kellerer.org/workbench

Cheers
Thomas


From: drdave <abuse(at)rr(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I save/load all triggers/stored procedures from a file?
Date: 2003-04-01 10:59:14
Message-ID: 6ieia.43926$k8.1607599@twister.austin.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Thomas Kellerer wrote:

> Razvan schrieb:
>> Hi
>>
>> Also, how can I see the body of a trigger that is already in the
>> database? If I do "\d <table_name>" I get the name of the trigger.
>> What should I do to see the body - I mean what you have typed when
>> you have created the trigger.
>
> I have just updated my SQL Workbench to support exactly this. It is a
> Java based frontend to any JDBC database. It's free and if you want, you
> can have a look at www.kellerer.org/workbench
>
> Cheers
> Thomas
Nice tool. It looks really useful. I had not seen that one before. Thanks.


From: mihai11(at)mailcity(dot)com (Razvan)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I save/load all triggers/stored procedures from a file?
Date: 2003-04-01 15:20:55
Message-ID: 15f19d61.0304010720.2535f2f8@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> I have just updated my SQL Workbench to support exactly this. It is a
> Java based frontend to any JDBC database. It's free and if you want, you
> can have a look at www.kellerer.org/workbench

The screen shots are nice; I'll definitively take a look.
The advantage over psql is that this front-end works in graphic mode.

Regards,
Razvan M