pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedWhich trigger execute which function?
4+ messages / 4 participants
[nested] [flat]
* Which trigger execute which function?
@ 2002-02-27 15:31 Raymond Chui <Raymond.Chui@noaa.gov>
0 siblings, 3 replies; 4+ messages in thread
From: Raymond Chui @ 2002-02-27 15:31 UTC (permalink / raw)
To: pgsql-general@postgresql.org; pgsql-admin
Previous DBA create a lot of triggers and functions without
documentation like:
CREATE TRIGGER trigger_name [BEFORE | AFTER] event ON table_name
FOR EACH ROW EXECUTE PROCEDURE function_name();
Now he is gone. I couldn't find his PL/PGSQL source codes!
I can do
SELECT * FROM pg_proc;
SELECT * FROM pg_trigger;
to list all the name of triggers and functions. But I don't know which
trigger
execute which function. How do I find out that?
Our USENET new server (NNTP) doesn't have comp.databases.postgresql.*
news groups. Therefore, please cc: a copy to me if you reply.
Thank Q very much in advance!
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [GENERAL] Which trigger execute which function?
@ 2002-03-04 15:51 Tom Lane <tgl@sss.pgh.pa.us>
parent: Raymond Chui <Raymond.Chui@noaa.gov>
2 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2002-03-04 15:51 UTC (permalink / raw)
To: Raymond Chui <raymond.chui@noaa.gov>; +Cc: pgsql-general@postgresql.org; pgsql-admin
"Raymond Chui" <Raymond.Chui@noaa.gov> writes:
> Previous DBA create a lot of triggers and functions without
> documentation like: ...
> Now he is gone. I couldn't find his PL/PGSQL source codes!
"pg_dump -s" is your friend.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Which trigger execute which function?
@ 2002-03-04 16:26 Stephan Szabo <sszabo@megazone23.bigpanda.com>
parent: Raymond Chui <Raymond.Chui@noaa.gov>
2 siblings, 0 replies; 4+ messages in thread
From: Stephan Szabo @ 2002-03-04 16:26 UTC (permalink / raw)
To: Raymond Chui <Raymond.Chui@noaa.gov>; +Cc: pgsql-general@postgresql.org; pgsql-admin
On Wed, 27 Feb 2002, Raymond Chui wrote:
> Previous DBA create a lot of triggers and functions without
> documentation like:
>
> CREATE TRIGGER trigger_name [BEFORE | AFTER] event ON table_name
> FOR EACH ROW EXECUTE PROCEDURE function_name();
>
> Now he is gone. I couldn't find his PL/PGSQL source codes!
>
> I can do
>
> SELECT * FROM pg_proc;
> SELECT * FROM pg_trigger;
select * from pg_trigger,pg_proc where tgfoid=pg_proc.oid;
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [GENERAL] Which trigger execute which function?
@ 2002-03-04 17:28 Joe Conway <mail@joeconway.com>
parent: Raymond Chui <Raymond.Chui@noaa.gov>
2 siblings, 0 replies; 4+ messages in thread
From: Joe Conway @ 2002-03-04 17:28 UTC (permalink / raw)
To: Raymond Chui <raymond.chui@noaa.gov>; +Cc: pgsql-general@postgresql.org; pgsql-admin
Raymond Chui wrote:
> Previous DBA create a lot of triggers and functions without
> documentation like:
>
> CREATE TRIGGER trigger_name [BEFORE | AFTER] event ON table_name
> FOR EACH ROW EXECUTE PROCEDURE function_name();
>
> Now he is gone. I couldn't find his PL/PGSQL source codes!
>
> I can do
>
> SELECT * FROM pg_proc;
> SELECT * FROM pg_trigger;
>
> to list all the name of triggers and functions. But I don't know which
> trigger
> execute which function. How do I find out that?
>
> Our USENET new server (NNTP) doesn't have comp.databases.postgresql.*
> news groups. Therefore, please cc: a copy to me if you reply.
> Thank Q very much in advance!
>
You could use "pg_dump -s > mydb.dmp" to dump the database schema. Then
open mydb.dmp in a text editor. I think this will show you all the
details you need.
HTH,
Joe
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-03-04 17:28 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-27 15:31 Which trigger execute which function? Raymond Chui <Raymond.Chui@noaa.gov>
2002-03-04 15:51 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-03-04 16:26 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2002-03-04 17:28 ` Joe Conway <mail@joeconway.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox