Re: lastval() - Mailing list pgsql-patches

From Neil Conway
Subject Re: lastval()
Date
Msg-id 42A3DEB1.8090702@samurai.com
Whole thread Raw
In response to Re: lastval()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: lastval()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> I agree with that --- consider that you couldn't actually promise that
> the sequence hadn't been dropped by the time the answer is returned,
> anyway, unless you take out a lock on the sequence first.  Which doesn't
> seem like a behavior that is wanted here.

The only objection I can see is that it arguably doesn't obey sequence
permissions: you need SELECT on a sequence to see its currval(), whereas
lastval() would return the same information without an equivalent
permission check.

-Neil

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: lastval()
Next
From: Tom Lane
Date:
Subject: Re: lastval()