Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-10-11 Thread Tom Lane
Markus Winand writes: > What I meant is that it was still working on > 4ac0f450b698442c3273ddfe8eed0e1a7e56645f, but not on the next > (3f50b82639637c9908afa2087de7588450aa866b). Yeah, silly oversight in that patch. Will push a fix shortly. regards, tom lane

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-10-11 Thread Markus Winand
> On 11.10.2021, at 16:27, Peter Eisentraut > wrote: > > On 11.10.21 12:22, Markus Winand wrote: >> Both variants work fine before that patch >> (4ac0f450b698442c3273ddfe8eed0e1a7e56645f). > > That commit is a message wording patch. Are you sure you meant that one? > What I meant is that

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-10-11 Thread Peter Eisentraut
On 11.10.21 12:22, Markus Winand wrote: Both variants work fine before that patch (4ac0f450b698442c3273ddfe8eed0e1a7e56645f). That commit is a message wording patch. Are you sure you meant that one?

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-10-11 Thread Markus Winand
Hi! It seems like this patch causes another problem. If I explain a simple row generator **without** verbose, it fails: postgres=# EXPLAIN (VERBOSE FALSE) WITH RECURSIVE gen (n) AS ( VALUES (1) UNION ALL SELECT n+1

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-21 Thread torikoshia
On 2021-09-16 08:40, Tom Lane wrote: I wrote: I do not think that patch is a proper solution, but we do need to do something about this. I poked into this and decided it's an ancient omission within ruleutils.c. The reason we've not seen it before is probably that you can't get to the case

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-16 Thread Andreas Joseph Krogh
På torsdag 16. september 2021 kl. 18:57:39, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: [...] > FWIW; I saw this Open Item was set to fixed, but I'm still getting this error > in 388726753b638fb9938883bdd057b2ffe6f950f5 The open item was not about that parser shortcoming, nor did this patch

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-16 Thread Tom Lane
Andreas Joseph Krogh writes: > På torsdag 16. september 2021 kl. 01:40:31, skrev Tom Lane > >: > [...] > regression=# with recursive cte (x,r) as ( > select 42 as x, row(i, 2.3) as r from generate_series(1,3) i > union all > select x, row((c.r).f1, 4.5) from cte

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-16 Thread Andreas Joseph Krogh
På torsdag 16. september 2021 kl. 01:40:31, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: [...] regression=# with recursive cte (x,r) as ( select 42 as x, row(i, 2.3) as r from generate_series(1,3) i union all select x, row((c.r).f1, 4.5) from cte c ) select * from cte; ERROR: record type

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-16 Thread Andrew Dunstan
On 9/15/21 7:40 PM, Tom Lane wrote: > I wrote: >> I do not think that patch is a proper solution, but we do need to do >> something about this. > I poked into this and decided it's an ancient omission within ruleutils.c. > The reason we've not seen it before is probably that you can't get to the

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-15 Thread Tom Lane
I wrote: > I do not think that patch is a proper solution, but we do need to do > something about this. I poked into this and decided it's an ancient omission within ruleutils.c. The reason we've not seen it before is probably that you can't get to the case through the parser. The SEARCH stuff

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-15 Thread Tom Lane
Andrew Dunstan writes: > On 9/10/21 10:10 AM, torikoshia wrote: >> I've attached the patch for the changes made for this test for your >> reference, but I'm not sure it's appropriate for creating a new >> CoercionForm to fix the issue.. > This is listed as an open item for release 14. Is it

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-15 Thread Andrew Dunstan
On 9/10/21 10:10 AM, torikoshia wrote: > On 2021-09-09 19:03, Peter Eisentraut wrote: >> On 07.09.21 20:31, Tom Lane wrote: >>> torikoshia writes: While working on [1], we found that EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST ends up ERROR. >>> >>> Yeah.  It's failing

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-10 Thread torikoshia
On 2021-09-09 19:03, Peter Eisentraut wrote: On 07.09.21 20:31, Tom Lane wrote: torikoshia writes: While working on [1], we found that EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST ends up ERROR. Yeah. It's failing here: * We're deparsing a Plan tree so we don't

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-09 Thread Peter Eisentraut
On 07.09.21 20:31, Tom Lane wrote: torikoshia writes: While working on [1], we found that EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST ends up ERROR. Yeah. It's failing here: * We're deparsing a Plan tree so we don't have a CTE * list. But

Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-07 Thread Tom Lane
torikoshia writes: > While working on [1], we found that EXPLAIN(VERBOSE) to CTE with SEARCH > BREADTH FIRST ends up ERROR. Yeah. It's failing here: * We're deparsing a Plan tree so we don't have a CTE * list. But the only place we'd see a Var

EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails

2021-09-06 Thread torikoshia
Hi, While working on [1], we found that EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST ends up ERROR. This can be reproduced at the current HEAD(4c3478859b7359912d7): =# create table graph0( f int, t int, label text); CREATE TABLE =# insert into graph0 values (1, 2, 'arc 1 ->