Re: BUG #17644: EXPLAIN VERBOSE fails on query with SEARCH BREADTH FIRST
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: postgresql@zr40.nl
Cc: pgsql-bugs@lists.postgresql.org
Date: 2022-10-16T23:21:50Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes: > The following query causes EXPLAIN VERBOSE to raise an error. > EXPLAIN VERBOSE > WITH RECURSIVE test AS ( > SELECT 1 AS x > UNION ALL > SELECT x+1 > FROM test > ) SEARCH BREADTH FIRST BY x SET y > SELECT * FROM test LIMIT 10; > ERROR: record type has not been registered Thanks for the report! We'd fixed some closely-related cases during v14 beta, but nobody stumbled on this one. The key point seems to be using all constants in the non-recursive term's SELECT list. regards, tom lane
Commits
-
Fix get_expr_result_type() to find field names for RECORD Consts.
- 8a15b4178c40 12.17 landed
- 59bc0dfe44a6 13.13 landed
- 479b99125dcc 11.22 landed
-
Fix EXPLAIN of SEARCH BREADTH FIRST with a constant initial value.
- d57534740b76 16.0 landed
- d4abb0bc5abb 15.1 landed
- 8122160ffb68 14.6 landed