Re: Is PRIMARY KEY the same as UNIQUE NOT NULL?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is PRIMARY KEY the same as UNIQUE NOT NULL?
Дата
Msg-id 25592.1454879075@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Is PRIMARY KEY the same as UNIQUE NOT NULL?  (Geoff Winkless <pgsqladmin@geoff.dj>)
Ответы Re: Is PRIMARY KEY the same as UNIQUE NOT NULL?  (Ben Leslie <benno@benno.id.au>)
Re: Is PRIMARY KEY the same as UNIQUE NOT NULL?  (Geoff Winkless <pgsqladmin@geoff.dj>)
Список pgsql-general
Geoff Winkless <pgsqladmin@geoff.dj> writes:
> On 31 January 2016 at 19:53, David G. Johnston
> <david.g.johnston@gmail.com> wrote:
>> A PRIMARY KEY enforces a UNIQUE, NOT NULL constraint and additionally allows
> [snip]

> I would just remove the whole paragraph. A primary key does what it
> does, a unique constraint does what it does. I'm not really sure why
> you need to link them.

I think it is useful to compare them; the only problem is claiming that
they're equivalent.

I've applied some doc updates based on this discussion.

http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=c477e84fe2471cb675234fce75cd6bb4bc2cf481

            regards, tom lane


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Trouble installing postgresql server on Amazon Linux
Следующее
От: Augori
Дата:
Сообщение: Re: Trouble installing postgresql server on Amazon Linux