Re: [Q] Sequences, last_value and inserts - Mailing list pgsql-general

From Marie G. Tuite
Subject Re: [Q] Sequences, last_value and inserts
Date
Msg-id IGELKLINGDMODABPOOFEMEAOCLAA.marie.tuite@edisonaffiliates.com
Whole thread Raw
In response to Re: [Q] Sequences, last_value and inserts  (Doug McNaught <doug@mcnaught.org>)
Responses Re: [Q] Sequences, last_value and inserts
List pgsql-general
select last_value from domain_info_tbl_key_seq;

This returns the same value as currval.

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Doug McNaught
> Sent: Friday, November 01, 2002 2:23 PM
> To: Roderick A. Anderson
> Cc: Bruno Wolff III; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] [Q] Sequences, last_value and inserts
>
>
> "Roderick A. Anderson" <raanders@acm.org> writes:
>
> > On Fri, 1 Nov 2002, Bruno Wolff III wrote:
> >
> > > You want to use currval. This can be used within a single
> session safely.
> >
> > I must be thick today.
> >
> > select currval from domain_info_tbl_key_seq;
> > ERROR:  Attribute 'currval' not found
>
> Try:
>
> select currval('domain_info_tbl_key_seq');
>
> If you read the docs, you would know this.  ;)
>
> -Doug
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>


pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: [Q] Sequences, last_value and inserts
Next
From: "Gregory Wood"
Date:
Subject: Re: [Q] Sequences, last_value and inserts