Re: unique constraint instead of primary key? what disadvantage(ODBC usage)?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: unique constraint instead of primary key? what disadvantage(ODBC usage)?
Дата
Msg-id 2303.1139505155@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: unique constraint instead of primary key? what disadvantage(ODBC usage)?  ("BigSmoke" <bigsmoke@gmail.com>)
Список pgsql-sql
"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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Andreas Roth
Дата:
Сообщение: Change definition of a view
Следующее
От: "Keith Worthington"
Дата:
Сообщение: Re: Change definition of a view