Re: lastval(seq) ? - Mailing list pgsql-general

From scott.marlowe
Subject Re: lastval(seq) ?
Date
Msg-id Pine.LNX.4.33.0310210945010.10407-100000@css120.ihs.com
Whole thread Raw
In response to lastval(seq) ?  (CSN <cool_screen_name90001@yahoo.com>)
Responses Re: lastval(seq) ?
List pgsql-general
On Mon, 20 Oct 2003, CSN wrote:

> How do you get the last value of a sequence without
> having called nextval? phppgadmin displays last value
> for sequences (I haven't found out how yet rooting
> through the code).

First, the mandatory, why would you want to do that?

Second: select last_value from table_id_seq;

It's not transaction safe, so don't expect it to work right on busy
multi-user systems.


pgsql-general by date:

Previous
From: Richard Ellis
Date:
Subject: Re: Recomended FS
Next
From: Tom Lane
Date:
Subject: Re: how to use pg_resetxlog