Re: surrogate key or not? - Mailing list pgsql-sql

From Rod Taylor
Subject Re: surrogate key or not?
Date
Msg-id 1090422650.21450.13.camel@jester
Whole thread Raw
In response to Re: surrogate key or not?  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
> All three of these implementation issues are, at least in theory, 
> surmountable.   For example, Sybase overcame problems (1) and (3) by creating 
> an automated, system-controlled hash key based on the table's real key.  This 
> was a solution endorsed by E.F. Codd in the mid-90's when he came to regret 
> his promotion of the "Primary Key" idea in the SQL standard.  

I've often wondered if the OID was intended to be something similar. 

You specify:
CREATE TABLE abc (key varchar(120) PRIMARY KEY);CREATE TABLE bcd (key varchar(120) REFERENCES abc);

PostgreSQL was actually supposed to create:
abc(oid oid, key varchar(120) PRIMARY KEY);bcd(key oid REFERENCES abc(oid));

Then muck around with the queries to resolve the actual varchar() name
when required.




pgsql-sql by date:

Previous
From: "Javier Tesis Tolosa Trabajo"
Date:
Subject: Sorry too many conecctions
Next
From: Geoff Richards
Date:
Subject: Re: MySQL-style "create temporary table foo select ..."