syncing a serial across tables

From: "Keith Worthington" <keithw(at)narrowpathinc(dot)com>
To: "PostgreSQL Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: syncing a serial across tables
Date: 2005-05-12 17:48:02
Message-ID: 20050512174434.M66389@narrowpathinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi All,

I believe I need to use a serial column in two tables and keep then synched.
I am thinking that I could use an AFTER INSERT trigger and INSERT currval()
into the second table to keep them synched. Has anyone done this before? Is
this a bad idea?

Kind Regards,
Keith

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Volkan YAZICI 2005-05-12 18:02:31 Re: syncing a serial across tables
Previous Message Andreas Pflug 2005-05-12 15:25:01 Re: Fwd: [NOVICE] Autocommit in Postgresql