pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@boutiquenumerique.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Michael Fuhr <mike@fuhr.org>
Cc: lmeadors@apache.org
Cc: pgsql-sql@postgresql.org
Subject: Re: getting back autonumber just inserted
Date: Fri, 08 Jul 2005 01:54:46 +0200
Message-ID: <op.stkh1kjcth1vuj@localhost> (raw)
In-Reply-To: <20050707224227.GB23230@alvh.no-ip.org>
References: <42CD6B58.6060508@techevolution.be>
	<20050707201433.94901.qmail@web41013.mail.yahoo.com>
	<20050707203715.GA26528@winnie.fuhr.org>
	<a10a823c05070713473add03d7@mail.gmail.com>
	<20050707205725.GA28200@winnie.fuhr.org>
	<op.stkdygr8th1vuj@localhost>
	<20050707224227.GB23230@alvh.no-ip.org>


>> 	What happens if an INSERT trigger inserts something into another
>> 	table  which also has a sequence ?
>
> Using what, lastval()?  The app will get very confused, because it'll
> get the value from the sequence used in the trigger.  Using currval
> there is no problem, but you already knew that.

	I knew but I forgot since I use an ORM which handles all the mess ;)





view thread (30+ messages)  latest in thread

Message-ID: <op.stkh1kjcth1vuj@localhost>
Permalink:  ../op.stkh1kjcth1vuj@localhost/
Also on:    postgresql.org/message-id/op.stkh1kjcth1vuj@localhost

 · 

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: lists@boutiquenumerique.com, alvherre@alvh.no-ip.org, mike@fuhr.org, lmeadors@apache.org
  Subject: Re: getting back autonumber just inserted
  In-Reply-To: <op.stkh1kjcth1vuj@localhost>

* 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