Re: lastval()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Abhijit Menon-Sen <ams(at)oryx(dot)com>, db(at)zigo(dot)dhs(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: lastval()
Date: 2005-06-06 04:20:44
Message-ID: 17146.1118031644@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Neil Conway <neilc(at)samurai(dot)com> writes:
> Abhijit Menon-Sen wrote:
>> I'd really like to see a concise, complete description of the proposed
>> function, including potential caveats.

> lastval() returns the last value produced by nextval() or setval() in
> the current session.

This definition is OK with me ... so long as it still includes the
phrase "an error occurs if no nextval or setval has occurred in the
current session". However it seemed that a number of people asking
for the feature wanted some-random-default to be returned instead.

Another question is why should setval affect the result? I don't
see the use-case for that offhand.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2005-06-06 04:57:02 Re: lastval()
Previous Message Neil Conway 2005-06-06 03:57:12 Re: lastval()

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2005-06-06 04:57:02 Re: lastval()
Previous Message Neil Conway 2005-06-06 03:57:12 Re: lastval()