Re: Re: Re: is PG able to handle a >500 GB Database? - Mailing list pgsql-general

From Brett W. McCoy
Subject Re: Re: Re: is PG able to handle a >500 GB Database?
Date
Msg-id Pine.LNX.4.30.0101201135460.28271-100000@chapelperilous.net
Whole thread Raw
In response to Re: Re: Re: is PG able to handle a >500 GB Database?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: Re: is PG able to handle a >500 GB Database?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Sat, 20 Jan 2001, Tom Lane wrote:

> > currval returns error unless nextval has been called at least once in the
> > session.
>
> > I use <seq>.last_value
>
> > Perhaps I'm fooling myself
>
> Yes, you are, unless you never have more than one client attached to
> your database.  last_value will return whatever value was last assigned
> by any backend, therefore you might not get the value that was inserted
> into your tuple, but someone else's.

In that case you would call next_val *before* you insert and use that
value in the INSERT statement.

-- Brett
                                     http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
Military intelligence is a contradiction in terms.
        -- Groucho Marx


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_sendmail function compile problem
Next
From: Tom Lane
Date:
Subject: Re: Re: Re: is PG able to handle a >500 GB Database?