in reply to Unique ID
If this unique ID does not have to be any thing in particular, you might as well use the oid column. oid is unique for every single row in the database, and is created when you insert a row.
It's sort of a "hidden" field, so when you query, you have to do
SELECT oid,* FROM table; # if you already know your oid.. SELECT * FROM table WHERE oid = x;
This is so much easier than maintaining a sequence.... and is universal for Postgres.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Unique ID
by nlafferty (Scribe) on Jul 19, 2001 at 23:36 UTC | |
by lestrrat (Deacon) on Jul 20, 2001 at 13:04 UTC | |
|
Re: Re: Unique ID
by nlafferty (Scribe) on Jul 19, 2001 at 21:14 UTC |