pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: lmeadors@apache.org
Cc: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: getting back autonumber just inserted
Date: Thu, 14 Jul 2005 08:05:17 -0500
Message-ID: <20050714130517.GA11501@wolff.to> (raw)
In-Reply-To: <a10a823c05070713473add03d7@mail.gmail.com>
References: <42CD6B58.6060508@techevolution.be>
	<20050707201433.94901.qmail@web41013.mail.yahoo.com>
	<20050707203715.GA26528@winnie.fuhr.org>
	<a10a823c05070713473add03d7@mail.gmail.com>

On Thu, Jul 07, 2005 at 14:47:23 -0600,
  Larry Meadors <larry.meadors@gmail.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.



view thread (30+ messages)

Message-ID: <20050714130517.GA11501@wolff.to>
Permalink:  ../20050714130517.GA11501@wolff.to/
Also on:    postgresql.org/message-id/20050714130517.GA11501@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bruno@wolff.to, lmeadors@apache.org, mike@fuhr.org
  Subject: Re: getting back autonumber just inserted
  In-Reply-To: <20050714130517.GA11501@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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