Skip site navigation (1) Skip section navigation (2)

Re: nextval/dbi question

From: Horst Herb <hherb(at)malleenet(dot)net(dot)au>
To: harrold(at)sage(dot)che(dot)pitt(dot)edu
Cc: Pgsql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: nextval/dbi question
Date: 2001-08-05 23:02:55
Message-ID: 0108060902553H.02026@munin.gnumed.dhs.org (view raw or flat)
Thread:
Lists: pgsql-novice
On Monday 06 August 2001 08:47, harrold(at)sage(dot)che(dot)pitt(dot)edu wrote:

> i was under the impression that nextval would give what the nextval would
> be. i didnt think it was suppose to increment it. after reading your
> response and someone else's it seems i need to get the next value of the
> key and insert it explicitly is that correct?

Yes. Alternatively, you can let Postgres use nextval implicitly, and call 
currval afterwards to get the value of the inserted "nextval"

Horst

In response to

Responses

pgsql-novice by date

Next:From: harroldDate: 2001-08-05 23:06:54
Subject: Re: nextval/dbi question
Previous:From: harroldDate: 2001-08-05 22:47:22
Subject: Re: nextval/dbi question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group