pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yasir Malik <ymalik@cs.stevens-tech.edu>
To: Greg Stark <gsstark@mit.edu>
Cc: Guillaume LELARGE <gleu@wanadoo.fr>
Cc: pgsql-sql@postgresql.org
Subject: Re: Getting last insert value
Date: Sat, 15 Nov 2003 15:11:04 -0500
Message-ID: <Pine.SGI.4.58.0311151510140.80813@guinness.cs.stevens-tech.edu> (raw)
In-Reply-To: <8765hlmsgr.fsf@stark.dyndns.tv>
References: <Pine.SGI.4.58.0311151003320.76056@guinness.cs.stevens-tech.edu>
	<200311151640.42892.gleu@wanadoo.fr>
	<8765hlmsgr.fsf@stark.dyndns.tv>

Thank you all for your help.
Yasir Malik

On Sat, 15 Nov 2003, Greg Stark wrote:

> Date: 15 Nov 2003 12:50:28 -0500
> From: Greg Stark <gsstark@mit.edu>
> To: Guillaume LELARGE <gleu@wanadoo.fr>
> Cc: Yasir Malik <ymalik@cs.stevens-tech.edu>, pgsql-sql@postgresql.org
> Subject: Re: [SQL] Getting last insert value
>
>
> Guillaume LELARGE <gleu@wanadoo.fr> writes:
>
> > Doing a "select currval() from my_table" after your insert should work.
>
> That's "select currval('my_table_pkcol_seq')" actually.
>
> The above would have called the currval() function for every record of the
> table which isn't what you want and in any case currval takes an argument.
>
> --
> greg
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>



view thread (7+ messages)  latest in thread

Message-ID: <Pine.SGI.4.58.0311151510140.80813@guinness.cs.stevens-tech.edu>
Permalink:  ../Pine.SGI.4.58.0311151510140.80813@guinness.cs.stevens-tech.edu/
Also on:    postgresql.org/message-id/Pine.SGI.4.58.0311151510140.80813@guinness.cs.stevens-tech.edu

 · 

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: ymalik@cs.stevens-tech.edu, gsstark@mit.edu, gleu@wanadoo.fr
  Subject: Re: Getting last insert value
  In-Reply-To: <Pine.SGI.4.58.0311151510140.80813@guinness.cs.stevens-tech.edu>

* 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