Re: is PG able to handle a >500 GB Database?

From: Florent Guillaume <efgeor(at)noos(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: is PG able to handle a >500 GB Database?
Date: 2001-01-19 16:26:50
Message-ID: 20010119172650.A6072@twin.efge.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Unless your application logic tries to use OIDs as row identifiers,
> duplicate OIDs in user tables are not a problem.

Hmmm, that means that the following, which I use, is not strictly correct :

create table t1 (recordid SERIAL PRIMARY KEY, val INT4, name TEXT);
... much later ...
insert into t1 (val, name) values (3465, 'blah');
-- PHP application gets $lastoid for this insert
select recordid from t1 where oid = $lastoid;
-- PHP application now hast the recordid that was created.

Because the last select could return several lines.

What would be the correct idiom ? Explicitly use nextval ? That pretty
defeats the point of SERIAL, no ?

Florent

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Florent Guillaume 2001-01-19 16:27:24 Arrays advanced usage
Previous Message Gordan Bobic 2001-01-19 16:25:05 RegisterSharedInvalid?