postgresql/src/backend/catalog
Tom Lane 849c7971d1 Disallow whole-row variables in GENERATED expressions.
This was previously allowed, but I think that was just an oversight.
It's a clear violation of the rule that a generated column cannot
depend on itself or other generated columns.  Moreover, because the
code was relying on the assumption that no such cross-references
exist, it was pretty easy to crash ALTER TABLE and perhaps other
places.  Even if you managed not to crash, you got quite unstable,
implementation-dependent results.

Per report from Vitaly Ustinov.
Back-patch to v12 where GENERATED came in.

Discussion: https://postgr.es/m/CAM_DEiWR2DPT6U4xb-Ehigozzd3n3G37ZB1+867zbsEVtYoJww@mail.gmail.com
2021-05-21 15:12:19 -04:00
..
.gitignore Remove separate files for the initial contents of pg_(sh)description 2020-01-19 13:54:58 +02:00
aclchk.c Fix ALTER DEFAULT PRIVILEGES with duplicated objects 2021-01-20 11:39:14 +09:00
catalog.c Invent "trusted" extensions, and remove the pg_pltemplate catalog. 2020-01-29 18:42:43 -05:00
Catalog.pm Clarify coding in Catalog::AddDefaultValues. 2020-02-15 15:13:44 -05:00
dependency.c Dial back -Wimplicit-fallthrough to level 3 2020-05-13 15:31:14 -04:00
genbki.pl Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
heap.c Disallow whole-row variables in GENERATED expressions. 2021-05-21 15:12:19 -04:00
index.c Preserve pg_attribute.attstattarget across REINDEX CONCURRENTLY 2021-02-10 13:09:09 +09:00
indexing.c Assert that we don't insert nulls into attnotnull catalog columns. 2020-07-21 12:38:08 -04:00
information_schema.sql Repair performance regression in information_schema.triggers view. 2020-04-24 12:02:36 -04:00
Makefile Split out CreateCast into src/backend/catalog/pg_cast.c 2020-03-10 11:28:23 -03:00
namespace.c Improve performance of "simple expressions" in PL/pgSQL. 2020-03-26 18:58:57 -04:00
objectaccess.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
objectaddress.c Fix use-after-release issue with pg_identify_object_as_address() 2021-04-28 11:58:43 +09:00
partition.c Plug memory leak in index_get_partition 2020-11-06 22:52:15 -03:00
pg_aggregate.c Fix misleading error message about inconsistent moving-aggregate types. 2020-09-06 12:55:28 -04:00
pg_cast.c Update copyright year 2020-09-11 12:55:19 -03:00
pg_collation.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_constraint.c Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
pg_conversion.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_db_role_setting.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_depend.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
pg_enum.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_inherits.c Disallow converting an inheritance child table to a view. 2021-02-06 15:17:01 -05:00
pg_largeobject.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_namespace.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_operator.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_proc.c Fix list-munging bug that broke SQL function result coercions. 2020-10-19 14:33:10 -04:00
pg_publication.c Fix error with CREATE PUBLICATION, wal_level=minimal, and new tables. 2021-01-30 00:12:05 -08:00
pg_range.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_shdepend.c Prevent drop of tablespaces used by partitioned relations 2021-01-14 15:32:14 -03:00
pg_subscription.c Correctly mark pg_subscription_rel.srsublsn as nullable. 2020-07-20 14:55:56 -04:00
pg_type.c Allow ALTER TYPE to change some properties of a base type. 2020-03-06 12:19:29 -05:00
sql_feature_packages.txt Cleanup in SQL features files 2020-03-28 08:46:18 +01:00
sql_features.txt Support FETCH FIRST WITH TIES 2020-04-07 16:22:13 -04:00
storage.c Extend PageIsVerified() to handle more custom options 2020-11-02 10:41:23 +09:00
system_views.sql Resolve gratuitous tabs in SQL file 2020-07-17 15:08:43 +02:00
toasting.c Implement operator class parameters 2020-03-30 19:17:23 +03:00