On Thu, 21 Mar 2002, Magnus Lie Hetland wrote:
> As an aside: In Postgres (if I'm tied to it anyway), is it OK to use
> the implicid OID column instead of constructing a serial ID column? It
> seems to be what it's there for, but in all the examples I've seen,
> there has been a separate ID column -- perhaps to make the schema
> portable to other databases?

IIRC, you _can_ use the OID to identify rows/objects. However, it's
not possible to set an OID to a _certain_ value because the database
server assigns them.

Until recently, this would have been a problem if you dumped a part of
your database and read it back later, - the OIDs would have been lost,
or to put it another way, generated with new values.

Never versions of PostgreSQL (or maybe only 7.2?) allow to store and
retrieve the OIDs, though.

Bottom line: I would rather recommend to use conventional SERIAL
columns instead of OIDs.

Stefan



_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to