"BigSmoke" <bigsmoke@gmail.com> writes:
> As far as I know, though, PRIMARY KEY does the same thing as UNIQUE NOT
> NULL in PostgreSQL.
They are 99.9% the same --- the *only* difference AFAIR is that PRIMARY
KEY establishes a default column-to-reference for FOREIGN KEY references
to the table. UNIQUE doesn't; you can make a FOREIGN KEY reference to a
column that's only UNIQUE, but you'll always have to specify which column.
regards, tom lane