Re: Strategy for Primary Key Generation When Populating Table

Поиск
Список
Период
Сортировка
От Vincent Veyron
Тема Re: Strategy for Primary Key Generation When Populating Table
Дата
Msg-id 1328903784.2537.23.camel@asus-1001PX.home
обсуждение исходный текст
Ответ на Re: Strategy for Primary Key Generation When Populating Table  (David Johnston <polobo@yahoo.com>)
Ответы Re: Strategy for Primary Key Generation When Populating Table  (David Johnston <polobo@yahoo.com>)
Список pgsql-general
Le vendredi 10 février 2012 à 14:19 -0500, David Johnston a écrit :

> One possibility is to add a "version" field (integer) and combine evenement and version to create the unique.  I'd
alsocreate a partial unique on evenement/annule to ensure you do not make more than one active version. 
>

Hi David,


I don't find this solution very much different from using a surrogate
key?

Except that you then have to code it yourself, instead of using the
built-in serial.

--
Vincent Veyron
http://marica.fr/
Logiciel de gestion des sinistres et des contentieux pour le service juridique


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

Предыдущее
От: Steve Clark
Дата:
Сообщение: Re: " " around fields with psql
Следующее
От: Mike Blackwell
Дата:
Сообщение: 9.1.1 crash