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>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: lastval()
Date: 2005-05-09 04:21:09
Message-ID: Pine.LNX.4.44.0505090610170.7072-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2005-05-09 05:31:55 Re: pl/pgsql enabled by default
Previous Message Dennis Bjorklund 2005-05-09 04:10:02 Re: lastval()

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2005-05-09 10:35:09 Updated kerberos service name patch
Previous Message Dennis Bjorklund 2005-05-09 04:10:02 Re: lastval()