Re: Fix incorrect column name in error message for range partition bound check

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Fix incorrect column name in error message for range partition bound check
Дата
Msg-id CAApHDvodF8tCH4U+5ubY=SKubBbeH-OmruMt2Pp74k3y9SPn9w@mail.gmail.com
обсуждение исходный текст
Ответ на Fix incorrect column name in error message for range partition bound check  (myzhen <zhenmingyang@yeah.net>)
Список pgsql-hackers
On Wed, 7 Jan 2026 at 18:45, myzhen <zhenmingyang@yeah.net> wrote:
> postgres=# CREATE TABLE pt_test_colname(a int, b int, c int) PARTITION BY RANGE(a, b);

> -- wrong case
> postgres=# CREATE TABLE pt_test_colname_p1 PARTITION OF pt_test_colname FOR VALUES FROM (minvalue, now()) TO (100,
100);
> ERROR: specified value cannot be cast to type integer for column "a"
> LINE 1: ...ION OF pt_test_colname FOR VALUES FROM (minvalue, now()) TO ...

(I thought I'd sent this email last week, but I don't see it in the
archives or my sent items)

I've pushed a fix similar to your v1 patch for this.  I used
foreach_current_index rather than what you did in your v1. That seems
less prone to get broken again in the future if someone were to add
additional logic within the loop body.

I didn't see any need to do any more than that, so I didn't consider
anything your v2 patch did.

Thanks for the patch.

David



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