postgresql/src/backend
Andrew Dunstan 0a4efdc7eb
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
2021-06-18 06:51:12 -04:00
..
access Tidy up GetMultiXactIdMembers()'s behavior on error 2021-06-17 14:50:42 +03:00
bootstrap Rethink definition of pg_attribute.attcompression. 2021-05-27 13:24:27 -04:00
catalog Don't set a fast default for anything but a plain table 2021-06-18 06:51:12 -04:00
commands Fix plancache refcount leak after error in ExecuteQuery. 2021-06-16 19:30:17 -04:00
executor Fix copying data into slots with FDW batching 2021-06-16 23:49:25 +02:00
foreign Update copyright for 2021 2021-01-02 13:06:25 -05:00
jit Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
lib Fix typo in comment 2021-04-20 14:35:16 +02:00
libpq Fix RADIUS error reporting in hba file parsing 2021-05-31 18:43:48 +02:00
main Update copyright for 2021 2021-01-02 13:06:25 -05:00
nodes Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
optimizer Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
parser Change position of field "transformed" in struct CreateStatsStmt. 2021-06-10 21:56:14 -07:00
partitioning Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
po Translation updates 2021-05-17 14:30:27 +02:00
port Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
postmaster Make archiver process handle barrier events. 2021-06-18 17:57:09 +09:00
regex Fix performance issue in new regex match-all detection code. 2021-05-03 11:42:31 -04:00
replication Improve SQLSTATE reporting in some replication-related code. 2021-06-16 11:52:05 -04:00
rewrite Adjust locations which have an incorrect copyright year 2021-06-04 12:19:50 +12:00
snowball Update snowball 2021-02-19 08:10:15 +01:00
statistics Fix an asssortment of typos in brin_minmax_multi.c and mcv.c 2021-06-10 20:13:44 +12:00
storage Remove pg_wait_for_backend_termination(). 2021-06-14 17:29:37 -07:00
tcop Restore the portal-level snapshot after procedure COMMIT/ROLLBACK. 2021-05-21 14:03:59 -04:00
tsearch Fix typos and grammar in comments and docs 2021-04-19 11:32:30 +09:00
utils Revert 29854ee8d1 due to buildfarm failures 2021-06-15 21:44:40 +03:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Use sort_template.h for qsort_tuple() and qsort_ssup(). 2021-03-03 17:02:32 +13:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Translation updates 2021-05-10 14:36:21 +02:00