pgsql: Don't set a fast default for anything but a plain table

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема pgsql: Don't set a fast default for anything but a plain table
Дата
Msg-id E1luD55-0001Lw-90@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Don't set a fast default for anything but a plain table

The fast default code added in Release 11 omitted to check that the
table a fast default was being added to was a plain table. Thus one
could be added to a foreign table, which predicably blows up. Here we
perform that check.

In addition, on the back branches, since some of these might have
escaped into the wild, if we encounter a missing value for
an attribute of something other than a plain table we ignore it.

Fixes bug #17056

Backpatch to release 11,

Reviewed by: Andres Freund, Álvaro Herrera and Tom Lane

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6432bfe8a372a1c1d4ee8edc91be7fe9910bf51d

Modified Files
--------------
src/backend/catalog/heap.c                 | 10 +++++++++-
src/backend/commands/tablecmds.c           |  5 +++--
src/backend/utils/cache/relcache.c         | 19 ++++++++++++++++++-
src/test/regress/expected/fast_default.out | 19 +++++++++++++++++++
src/test/regress/sql/fast_default.sql      | 14 ++++++++++++++
5 files changed, 63 insertions(+), 4 deletions(-)


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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: pgsql: Make archiver process an auxiliary process.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Don't set a fast default for anything but a plain table