X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 9E01CD1B50D for ; Sat, 15 Nov 2003 17:43:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 57498-08 for ; Sat, 15 Nov 2003 13:43:12 -0400 (AST) Received: from heineken.cs.stevens-tech.edu (heineken.cs.stevens-tech.edu [155.246.89.69]) by svr1.postgresql.org (Postfix) with ESMTP id D8A6ED1B8AA for ; Sat, 15 Nov 2003 13:43:11 -0400 (AST) Received: from ymalik (helo=localhost) by heineken.cs.stevens-tech.edu with local-esmtp (Exim 3.35 #1 (Debian)) id 1AL4S3-0002sg-00; Sat, 15 Nov 2003 12:43:15 -0500 Date: Sat, 15 Nov 2003 12:43:15 -0500 (EST) From: Yasir Malik To: Guillaume LELARGE Cc: pgsql-sql@postgresql.org Subject: Re: Getting last insert value In-Reply-To: <200311151741.41361.gleu@wanadoo.fr> Message-ID: References: <200311151640.42892.gleu@wanadoo.fr> <200311151741.41361.gleu@wanadoo.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/244 X-Sequence-Number: 16059 Guillaume, Thank you very much for your response. Yasir On Sat, 15 Nov 2003, Guillaume LELARGE wrote: > Date: Sat, 15 Nov 2003 17:41:41 +0000 > From: Guillaume LELARGE > To: pgsql-sql@postgresql.org > Subject: Re: [SQL] Getting last insert value > > Le Samedi 15 Novembre 2003 16:40, vous avez =E9crit : > > Doing a "select currval() from my_table" after your insert should work. > > > Actually, this is > select currval('my_sequence') > Sorry about this. > > > For more details, see > > http://www.postgresql.org/docs/7.3/interactive/functions-sequence.html > > > -- > Guillaume > . > > > ---------------------------(end of broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match >