Re: inserting new records without OIDs

Поиск
Список
Период
Сортировка
От Andreas Pflug
Тема Re: inserting new records without OIDs
Дата
Msg-id 40333AA9.4070605@pse-consulting.de
обсуждение исходный текст
Ответ на Re: inserting new records without OIDs  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Ответы Re: inserting new records without OIDs  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgadmin-support
Christopher Kings-Lynne wrote:

>> Not true. Currently, you need either OID *or* a primary key. 
>> Obviously, that id column should get a pk.
>> We'll extend the grid some time, to accept any other unique keys 
>> also. Still, defining a PK on every table is best practice.
>> Defining a column as serial does *not* guarantee it's unique!
>
>
> Remember that unique indexes can have multiple NULL values.

Shhh, didn't think of that. So we won't ever accept unique indices for this.

> Also, oids are not guaranteed unique.

AFAICS this only happens on wrap around, i.e. hopefully never. Being 
strict, we shouldn't rely on oid uniqueness, but in practice hopefully 
nobody will ever notice.

Regards,
Andreas




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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: inserting new records without OIDs
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: inserting new records without OIDs