Re: partitioning and identity column

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: partitioning and identity column
Дата
Msg-id CAExHW5v2WaY1oRCujT8_pBc6eQ6pfR+Gs9x91qxwzrv9Rug3rg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: partitioning and identity column  (Alexander Lakhin <exclusion@gmail.com>)
Ответы Re: partitioning and identity column  (Alexander Lakhin <exclusion@gmail.com>)
Список pgsql-hackers
Thanks Alexander for the report.

On Fri, Apr 26, 2024 at 5:30 PM Alexander Lakhin <exclusion@gmail.com> wrote:
Hello Ashutosh and Peter,

16.01.2024 21:59, Peter Eisentraut wrote:
> On 09.01.24 15:10, Ashutosh Bapat wrote:
>> Here's complete patch-set.
>
> Looks good!  Committed.
>

Please take a look at a new error case introduced by 699586315:
CREATE TABLE tbl1 (a int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY)
   PARTITION BY LIST (a);
CREATE TABLE tbl2 PARTITION OF tbl1 DEFAULT;

CREATE TABLE tbl3 (LIKE tbl2 INCLUDING IDENTITY);
ERROR:  no owned sequence found

I don't think creating a table like a partition is common or even useful. Usually it would create it from partitithe oned table. But if we consider that to be a use case, I think the error is expected since a partition doesn't have its own identity; it shares it with the partitioned table. Maybe we could give a better message. But I will look into this and fix it if the solution makes sense.

Do you want to track this in open items?

--
Best Wishes,
Ashutosh Bapat

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: some additional (small) problems with pg_combinebackup and tablespaces
Следующее
От: Melanie Plageman
Дата:
Сообщение: Re: BitmapHeapScan streaming read user and prelim refactoring