Re: lastval()

From: "John Hansen" <john(at)geeknet(dot)com(dot)au>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Dennis Bjorklund" <db(at)zigo(dot)dhs(dot)org>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: lastval()
Date: 2005-05-08 23:50:04
Message-ID: 5066E5A966339E42AA04BA10BA706AE50A9315@rodrick.geeknet.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:
> Sent: Monday, May 09, 2005 8:37 AM
> To: Dennis Bjorklund
> Cc: pgsql-patches(at)postgresql(dot)org
> Subject: Re: [PATCHES] lastval()
>
> Dennis Bjorklund <db(at)zigo(dot)dhs(dot)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(at)postgresql(dot)org
>
>

... John

Browse pgsql-patches by date

  From Date Subject
Next Message Satoshi Nagayasu 2005-05-09 00:02:07 Re: [HACKERS] read-only database
Previous Message Kris Jurka 2005-05-08 23:20:09 Re: Blob .getBytes position should start at 1