Re: lastval()

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

On Mon, 6 Jun 2005, Tom Lane wrote:

> You could fix that by remembering exactly which sequence produced
> the lastval and checking its permissions ...

That is what the implementation does. Instead of remembering the last
value it rememebers the last sequence (and it contains the last value for
that sequence).

The very reason for doing that in the first place was to mimic currval()
as much as possible wrt rights and existence of the sequence.

--
/Dennis Björklund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nithin Sontineni 2005-06-06 06:24:06 need help
Previous Message Tom Lane 2005-06-06 05:33:50 Re: lastval()

Browse pgsql-patches by date

  From Date Subject
Next Message ITAGAKI Takahiro 2005-06-06 06:53:27 Memory leak in BootStrapXLOG()
Previous Message Tom Lane 2005-06-06 05:33:50 Re: lastval()