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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to