| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Don't set a fast default for anything but a plain table |
| Date: | 2021-06-18 11:54:39 |
| Message-ID: | E1luD55-0001Ls-78@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0a4efdc7ebf2584257b166c87e82797eb92815b5
Modified Files
--------------
src/backend/catalog/heap.c | 10 +++++++++-
src/test/regress/expected/fast_default.out | 19 +++++++++++++++++++
src/test/regress/sql/fast_default.sql | 14 ++++++++++++++
3 files changed, 42 insertions(+), 1 deletion(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2021-06-18 13:26:36 | Re: pgsql: Don't set a fast default for anything but a plain table |
| Previous Message | Fujii Masao | 2021-06-18 08:58:51 | Re: pgsql: Make archiver process an auxiliary process. |