Re: TupleDescAttr bounds checks
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-23T03:54:41Z
Lists: pgsql-hackers
Oddly enough, "adder" just showed this same failure [1]: @@ -66,11 +66,9 @@ CREATE FUNCTION wrap_do_analyze(c INT) RETURNS INT IMMUTABLE LANGUAGE SQL AS 'SELECT $1 FROM public.do_analyze()'; CREATE INDEX ON vaccluster(wrap_do_analyze(i)); +ERROR: indexes on virtual generated columns are not supported INSERT INTO vaccluster VALUES (1), (2); ANALYZE vaccluster; and that's not in the test_plan_advice run at all, but pg_upgrade's run of the core regression tests. I wonder if we recently made some seemingly-unrelated change that has increased the probability of having a 'v' in the right byte. Anyway, you should get this fix pushed. regards, tom lane [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=adder&dt=2026-03-23%2002%3A23%3A13
Commits
-
Avoid unsafe access to negative index in a TupleDesc.
- 681a91d29d4d 17.10 landed
- 40fa04e7c851 14.23 landed
- 3c7a6bbe63e2 16.14 landed
- 11c2c0cc8d7c 18.4 landed
- 07e833e3cff3 15.18 landed
-
Disallow system columns in COPY FROM WHERE conditions.
- 21c69dc73f9d 19 (unreleased) landed
-
Add a test for creating an index on a whole-row expression.
- 4647ee2da37c 19 (unreleased) landed
-
Bounds-check access to TupleDescAttr with an Assert.
- c98ad086ad9b 19 (unreleased) landed
-
Prevent spurious "indexes on virtual generated columns are not supported".
- 570e2fcc041a 19 (unreleased) landed
- cceb9c18a50b 18.4 landed