Re: lastval() - Mailing list pgsql-patches

From John Hansen
Subject Re: lastval()
Date
Msg-id 5066E5A966339E42AA04BA10BA706AE50A9315@rodrick.geeknet.com.au
Whole thread Raw
In response to lastval()  (Dennis Bjorklund <db@zigo.dhs.org>)
List pgsql-patches
Tom Lane wrote:
> Sent: Monday, May 09, 2005 8:37 AM
> To: Dennis Bjorklund
> Cc: pgsql-patches@postgresql.org
> Subject: Re: [PATCHES] lastval()
>
> Dennis Bjorklund <db@zigo.dhs.org> writes:
> > Here is a small patch that implements a function lastval()
> that works
> > just like currval() except that it give the current value
> of the last
> > sequence used by nextval().
>
> Why is that a good idea?  In a complex application it'd be
> awfully easy to break logic that depends on such a thing.
>

And you threw out the idea when I proposed it more than a year ago.
However I'd still like to see it, tho in the same shape as 'the other
database'.

Eg, succeeding when nextval has not been called, returning 0.
Thus, my suggestion for last_insert_id() still stands.


>             regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org
>
>

... John

pgsql-patches by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Blob .getBytes position should start at 1
Next
From: Satoshi Nagayasu
Date:
Subject: Re: [HACKERS] read-only database