Re: lastval() - Mailing list pgsql-patches

From Dennis Bjorklund
Subject Re: lastval()
Date
Msg-id Pine.LNX.4.44.0505090610170.7072-100000@zigo.dhs.org
Whole thread Raw
In response to Re: lastval()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: lastval()  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-patches
On Sun, 8 May 2005, Tom Lane wrote:

> Like, say, the sequence being deleted before the lastval call?

Then you get an error message. Same thing if you have revoked the rights
on the sequence before you call lastval().

In this case you can get a value that belong to a sequence that is
deleted. Is that better? To me it's a sign that something is wrong with
the application and an error is better to get. It's not like it's hard to
store a int64 value instead. It's in fact simpler, but I just don't see
that it solve any problem. If anything it can hide problems.

If you want lastval() to work just don't delete the sequence. It's as
simple as that.

The thing is that I don't care how it's implemented, it's the feature
itself that is more importent to decide if we want it or not. I'm sure the
code can be fixed so everybody is happy it in the end,

--
/Dennis Björklund


pgsql-patches by date:

Previous
From: Dennis Bjorklund
Date:
Subject: Re: lastval()
Next
From: "Magnus Hagander"
Date:
Subject: Updated kerberos service name patch