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

Re: [PATCHES] Changes to sequence.c

From: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
To: "Billy G(dot) Allie" <Bill(dot)Allie(at)mug(dot)org>
Cc: pgsql-patches(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [PATCHES] Changes to sequence.c
Date: 1998-03-02 07:55:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Billy G. Allie wrote:
> I encountered a problem (bug? feature?) where "select currval('sequence')"
> will generate an error if "select nextval('sequence')" is not executed first.
> The attached patch will change this behaviour by reading the sequence tuple
> and returning the last_value attribute if nextval has not been called on the
> sequence yet.

This is feature :)
1. This is what Oracle does.
2. currval () is described as returning value returned by
   last nextval() in _session_.


In response to

pgsql-hackers by date

Next:From: Jan WieckDate: 1998-03-02 08:02:05
Subject: Re: [HACKERS] Rule plan size for views?
Previous:From: Tom I HelbekkmoDate: 1998-03-02 06:56:03
Subject: Re: [HACKERS] patch for --with-tcl

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