pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: trigger examples
4+ messages / 3 participants
[nested] [flat]

* Re: trigger examples
@ 2000-10-03 04:41  drfrog@smartt.com
  parent: Carolyn Lu Wong <carolyn@kss.net.au>
  0 siblings, 2 replies; 4+ messages in thread

From: drfrog@smartt.com @ 2000-10-03 04:41 UTC (permalink / raw)
  To: Carolyn Lu Wong <carolyn@kss.net.au>; +Cc: pgsql-sql

Carolyn Lu Wong wrote:
> 
> I need to write a trigger to create a new record in log table if it's a
> new record or if column A and B changes. Can someone give me an example
> how to do this.
> 
> Are there any sites that gives trigger examples??
> 
> Thanks.

the fulltextindex in the contrib dir gives an example



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* trigger examples
@ 2000-10-03 05:20  Carolyn Lu Wong <carolyn@kss.net.au>
  0 siblings, 1 reply; 4+ messages in thread

From: Carolyn Lu Wong @ 2000-10-03 05:20 UTC (permalink / raw)
  To: pgsql-sql

I need to write a trigger to create a new record in log table if it's a
new record or if column A and B changes. Can someone give me an example
how to do this.

Are there any sites that gives trigger examples??

Thanks.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: trigger examples
@ 2000-10-03 07:05  Carolyn Lu Wong <carolyn@kss.net.au>
  parent: drfrog@smartt.com
  1 sibling, 0 replies; 4+ messages in thread

From: Carolyn Lu Wong @ 2000-10-03 07:05 UTC (permalink / raw)
  To: pgsql-sql

drfrog@smartt.com wrote:
> 
> Carolyn Lu Wong wrote:
> >
> > I need to write a trigger to create a new record in log table if it's a
> > new record or if column A and B changes. Can someone give me an example
> > how to do this.
> >
> > Are there any sites that gives trigger examples??
> >
> > Thanks.
> 
> the fulltextindex in the contrib dir gives an example

The example uses C. Is it possible to create the trigger with plpsql
function?



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: trigger examples
@ 2000-10-03 13:41  Keith Wong <keith@e-magine.com.au>
  parent: drfrog@smartt.com
  1 sibling, 0 replies; 4+ messages in thread

From: Keith Wong @ 2000-10-03 13:41 UTC (permalink / raw)
  To: Carolyn Lu Wong <carolyn@kss.net.au>; pgsql-sql

This is an example script I use to keep a log of all database operations on 
my tables.
Hope it helps.

At 05:05 PM 3/10/2000 +1000, Carolyn Lu Wong wrote:
>drfrog@smartt.com wrote:
> >
> > Carolyn Lu Wong wrote:
> > >
> > > I need to write a trigger to create a new record in log table if it's a
> > > new record or if column A and B changes. Can someone give me an example
> > > how to do this.
> > >
> > > Are there any sites that gives trigger examples??
> > >
> > > Thanks.
> >
> > the fulltextindex in the contrib dir gives an example
>
>The example uses C. Is it possible to create the trigger with plpsql
>function?

Attachments:

  table_customer.sql (application/octet-stream, 4.6K) download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2000-10-03 13:41 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-03 05:20 trigger examples Carolyn Lu Wong <carolyn@kss.net.au>
2000-10-03 04:41 ` drfrog@smartt.com
2000-10-03 07:05   ` Carolyn Lu Wong <carolyn@kss.net.au>
2000-10-03 13:41   ` Keith Wong <keith@e-magine.com.au>

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