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.
In reply to Re: Unique ID
by lestrrat
in thread Unique ID
by nlafferty
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |