Re: Bug:Create a table with 1600 fields (reaching the upper limit), then drop several fields and create new ones, but the addition failed.

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Bug:Create a table with 1600 fields (reaching the upper limit), then drop several fields and create new ones, but the addition failed.
Дата
Msg-id CAKFQuwafVB0Bt0U2QUVHP-pkX-gggBm9bXkmCzfpWz7Z+f6YNQ@mail.gmail.com
обсуждение исходный текст
Ответ на Bug:Create a table with 1600 fields (reaching the upper limit), then drop several fields and create new ones, but the addition failed.  ("BO ST" <1599224321@qq.com>)
Список pgsql-bugs
On Thu, May 4, 2023 at 9:09 AM BO ST <1599224321@qq.com> wrote:
Create a table with 1600 fields (reaching the upper limit), then drop several fields and create new ones, but the addition failed.

test=# alter table t1 add column co1599 int;
ALTER TABLE
test=# alter table t1 add column co1600 int;
ALTER TABLE
test=# alter table t1 add column co1601 int;
psql: ERROR:  table can have at most 1600 columns

then, I drop column co1600 and add it again, failed:

test=# alter table t1 drop column co1600;
ALTER TABLE
test=# alter table t1 add column co1600 int;
psql: ERROR:  table can have at most 1600 columns

then, I drop column co1600 again:

test=# alter table t1 drop column co1600;
psql: ERROR: column "co1600" of relation "t1" dose not exist

Implementation details - not all columns that are present on a table are user-visible.  In particular, dropped columns remain but are inaccessible in order to avoid rewriting the table.

David J.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17920: Incorrect memory access in array_position(s) is detected (or not)
Следующее
От: Stan S
Дата:
Сообщение: Re: BUG #17914: walsenders taking up all memory