pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedexample of trigger to track DB changes
3+ messages / 3 participants
[nested] [flat]
* example of trigger to track DB changes
@ 1999-06-15 05:23 Michael Olivier <mo@local2me.com>
0 siblings, 1 reply; 3+ messages in thread
From: Michael Olivier @ 1999-06-15 05:23 UTC (permalink / raw)
To: pgsql-sql
I've looked through the trigger examples in the html doc and the src
tree but didn't find the one I was looking for.
I want to set up a trigger to track changes (add/update/delete) to rows
in two tables. This can be through inserting OID's or acctname's
(acctname of web users) into a "changed_rows" table that keeps track of
changed rows.
Would someone provide some source code that does this? I'm assuming a
lot of people have done this... I'm using 6.3.2 ...
thanks!
Michael
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [SQL] example of trigger to track DB changes
@ 1999-06-15 19:11 Brook Milligan <brook@trillium.NMSU.Edu>
parent: Michael Olivier <mo@local2me.com>
0 siblings, 1 reply; 3+ messages in thread
From: Brook Milligan @ 1999-06-15 19:11 UTC (permalink / raw)
To: mo@local2me.com; +Cc: pgsql-sql
I've looked through the trigger examples in the html doc and the src
tree but didn't find the one I was looking for.
Look in the rules docs instead.
I want to set up a trigger to track changes (add/update/delete) to rows
in two tables. This can be through inserting OID's or acctname's
(acctname of web users) into a "changed_rows" table that keeps track of
changed rows.
Would someone provide some source code that does this? I'm assuming a
lot of people have done this... I'm using 6.3.2 ...
The rules docs describe how to do exactly this and give an example.
Cheers,
Brook
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [SQL] example of trigger to track DB changes
@ 1999-06-16 10:55 Jan Wieck <wieck@debis.com>
parent: Brook Milligan <brook@trillium.NMSU.Edu>
0 siblings, 0 replies; 3+ messages in thread
From: wieck@debis.com @ 1999-06-16 10:55 UTC (permalink / raw)
To: brook@trillium.NMSU.Edu; +Cc: mo@local2me.com; pgsql-sql
>
> I've looked through the trigger examples in the html doc and the src
> tree but didn't find the one I was looking for.
>
> Look in the rules docs instead.
>
> I want to set up a trigger to track changes (add/update/delete) to rows
> in two tables. This can be through inserting OID's or acctname's
> (acctname of web users) into a "changed_rows" table that keeps track of
> changed rows.
>
> Would someone provide some source code that does this? I'm assuming a
> lot of people have done this... I'm using 6.3.2 ...
>
> The rules docs describe how to do exactly this and give an example.
But all those examples are based on v6.4. In fact the rule
system of v6.3.2 cannot handle them because it's broken!
Please upgrade to v6.5 (just released) before playing with
the rule system.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck@debis.com (Jan Wieck) #
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1999-06-16 10:55 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-06-15 05:23 example of trigger to track DB changes Michael Olivier <mo@local2me.com>
1999-06-15 19:11 ` Brook Milligan <brook@trillium.NMSU.Edu>
1999-06-16 10:55 ` Jan Wieck <wieck@debis.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