git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 84f5c29) | patch
Fix usage of "tableoid" in GENERATED expressions.
2021年5月21日 19:02:06 +0000 (15:02 -0400)
2021年5月21日 19:02:06 +0000 (15:02 -0400)
commit 2b0ee126bbf01cbfd657bd53c94f9284ba903ca2
Fix usage of "tableoid" in GENERATED expressions.

We consider this supported (though I've got my doubts that it's a
good idea, because tableoid is not immutable). However, several
code paths failed to fill the field in soon enough, causing such
a GENERATED expression to see zero or the wrong value. This
occurred when ALTER TABLE adds a new GENERATED column to a table
with existing rows, and during regular INSERT or UPDATE on a
foreign table with GENERATED columns.

Noted during investigation of a report from Vitaly Ustinov.
Back-patch to v12 where GENERATED came in.

Discussion: https://postgr.es/m/CAM_DEiWR2DPT6U4xb-Ehigozzd3n3G37ZB1+867zbsEVtYoJww@mail.gmail.com
src/backend/commands/tablecmds.c diff | blob | blame | history
src/backend/executor/nodeModifyTable.c diff | blob | blame | history
src/test/regress/expected/generated.out diff | blob | blame | history
src/test/regress/sql/generated.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /