Re: Identity columns should own only one sequence

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Identity columns should own only one sequence
Дата
Msg-id a27c42222ce3bcda2f17eeb3133ed475c6fb54ba.camel@cybertec.at
обсуждение исходный текст
Ответ на Identity columns should own only one sequence  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: Identity columns should own only one sequence
Список pgsql-hackers
I wrote:
> Identity columns don't work if they own more than one sequence.
> 
[...]
> test=> INSERT INTO ser (id) VALUES (DEFAULT);
> ERROR:  more than one owned sequence found
> 
> 
> I propose that we check if there already is a dependent sequence
> before adding an identity column.
> 
> The attached patch does that, and also forbids setting the ownership
> of a sequence to an identity column.

Alternatively, maybe getOwnedSequence should only consider sequences
with an "internal" dependency on the column.  That would avoid the problem
without forbidding anything, since normal OWNED BY dependencies are "auto".

What do you think?

Yours,
Laurenz Albe




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: hyrax vs. RelationBuildPartitionDesc
Следующее
От: Floris Van Nee
Дата:
Сообщение: partitioning performance tests after recent patches