Re: getting back autonumber just inserted

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: lmeadors(at)apache(dot)org
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-sql(at)postgresql(dot)org
Subject: Re: getting back autonumber just inserted
Date: 2005-07-14 13:05:17
Message-ID: 20050714130517.GA11501@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Jul 07, 2005 at 14:47:23 -0600,
Larry Meadors <larry(dot)meadors(at)gmail(dot)com> wrote:
> If you have a trigger on your table that inserts a record in a table
> and shares the same sequence, what value do you get back, the
> triggered curval, or the currently inserted one?

Whichever one was done second. I think it has to be the trigger, because
I think the inserted values will be evaluated first (even before aa
before trigger) since the triggers need to have access to them.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dhanashree 2005-07-14 14:23:04 difference between all RDBMSs
Previous Message Stefan Miefert 2005-07-14 10:40:16 [postgres] Datumsfeld leer lassen