Re: disallow alter individual column if partition key contains wholerow reference

Поиск
Список
Период
Сортировка
От jian he
Тема Re: disallow alter individual column if partition key contains wholerow reference
Дата
Msg-id CACJufxHP1+wodZeR5q9c+q+SLvJg6H+z3Jo1Sm1Q5cEvOe+b=A@mail.gmail.com
обсуждение исходный текст
Ответ на disallow alter individual column if partition key contains wholerow reference  (jian he <jian.universality@gmail.com>)
Ответы Re: disallow alter individual column if partition key contains wholerow reference
Список pgsql-hackers
On Tue, Apr 22, 2025 at 7:39 PM jian he <jian.universality@gmail.com> wrote:
>
> demo:
> drop table if exists t4;
> CREATE TABLE t4(f1 int, f2 bigint) PARTITION BY list ((t4));
> create table t4_1 partition of t4 for values in ((1,2));
> alter table t4 alter column f2 set data type text using f2;
>
> insert into t4 select 1, '2';
> ERROR: invalid memory alloc request size 18446744073709551615
>
> turns out the fix seems pretty simple, mainly on has_partition_attrs.
> has_partition_attrs is used to
> Checks if any of the 'attnums' is a partition key attribute for rel.
> if partition keys have column references, then has_partition_attrs
> should return true.
>

hi.
minor comments changes,
also add it on commitfest (https://commitfest.postgresql.org/patch/5988)

Вложения

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