Re: lastval()

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: lastval()
Date: 2005-05-10 21:23:45
Message-ID: Pine.OSF.4.61.0505110023180.368341@kosh.hut.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Mon, 9 May 2005, Dennis Bjorklund wrote:

> 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,

You could implement this on top of the current nextval without backend
changes.

Create a wrapper function on top of nextval that stores the value in a
temp table. Or a session variable if your PL language of choice has
them.

lastval would do a select on the temp table.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2005-05-10 21:34:18 Re: lastval()
Previous Message Heikki Linnakangas 2005-05-10 21:18:30 Re: [PATCHES] Cleaning up unreferenced table files

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2005-05-10 21:34:18 Re: lastval()
Previous Message Heikki Linnakangas 2005-05-10 21:18:30 Re: [PATCHES] Cleaning up unreferenced table files