Re: Inheritance and shared sequence

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Inheritance and shared sequence
Дата
Msg-id 4667C557.5000600@archonet.com
обсуждение исходный текст
Ответ на Inheritance and shared sequence  ("Sebastjan Trepca" <trepca@gmail.com>)
Ответы Re: Inheritance and shared sequence  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-general
Sebastjan Trepca wrote:
> Hi,
>
> as I understood, when you create a table which inherits some other
> table, the constraints and indexes do not go to the child table hence
> you have to create a separate ones in there. That means you cannot
> depend that you won't have duplicate IDs in both tables. Right?
>
> BUT...what if child table and parent table both use the same sequence
> for the primary key. Would the duplication still be an issue?

Well, if you *always* use the sequence you'll be OK (until you run out
of numbers), but it won't stop you manually supplying your own values.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: pl/pgsql debuging, was Re: debugging C functions
Следующее
От: Johannes Konert
Дата:
Сообщение: Suppress checking of chmod 700 on data-dir?