Forum OpenACS Development: Response to Where are the coding guidelines?

Collapse
Posted by Don Baccus on
Actually, Postgres doesn't require that you name the primary key either - this is standard SQL92.

In order to double-check, I just tried the following:


create table foo (i integer primary key);
create table bar (j integer references foo);

And it works fine.

The problem is that PG and SQL92 require you to define the *type* of the column, i.e. integer. Grabbing this from the referenced primary key is an Oracle extension. I happen to like it because the foreign key reference is further walled-off from the primary key definition, but it is non-standard ...