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

From: Florent Guillaume <florent(dot)guillaume(at)mail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: is PG able to handle a >500 GB Database?
Date: 2001-01-19 14:08:43
Message-ID: 20010119150843.A4430@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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lémery 2001-01-19 14:13:36 Re: .so functions and SQL queries
Previous Message Gregory Wood 2001-01-19 13:46:38 Re: .so functions and SQL queries