Basic trigger question - Mailing list pgsql-general

From Travis Bauer
Subject Basic trigger question
Date
Msg-id Pine.GSO.4.21.0005031538320.11501-100000@fiddler.cs.indiana.edu
Whole thread Raw
In response to Removing NOT NULL Contraint  (Matthew <matt@ctlno.com>)
List pgsql-general
I would like a trigger that does the following:

Whenever a record is updated or inserted into table A, insert a copy of
that record into table B, which is has exactly the same structure as table
A, except for an autoincrementing field which should get the next logical
value whenever a record is entered.

I'm sure this is a basic trigger problem, but I'm having trouble
figuringout the docs.

Thank in advance,

----------------------------------------------------------------
Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
----------------------------------------------------------------



pgsql-general by date:

Previous
From: Cliff Rowley
Date:
Subject: Re: [PHP3] Job openings (FreeBSD/C/php/postgresql)
Next
From: Terry Jarrard
Date:
Subject: What do you think?