From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Mike G <mike(at)thegodshalls(dot)com> |
Cc: | "raptor(at)tvskat(dot)net" <raptor(at)tvskat(dot)net>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: pgadmin 3 |
Date: | 2004-07-22 00:24:06 |
Message-ID: | 20040722002404.GF20162@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jul 21, 2004 at 12:06:09AM -0500, Mike G wrote:
> OID could be used for primary key I suppose. To use as a foreign key
> you would manually have to somehow copy the value in table A and
> insert into B. AFAIK system generated OIDS are unique to each table.
WRONG. OIDs are not guarenteed unique. They are not suitable for
primary keys. They will wrap eventually. They are not indexed in any
way unless you create an index yourself.
Use serials from primary keys, much safer...
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
From | Date | Subject | |
---|---|---|---|
Next Message | Grant McLean | 2004-07-22 02:15:04 | Re: Locking with foreign key constraints |
Previous Message | Tom Lane | 2004-07-22 00:08:34 | Re: SQL - display different data |