Re: BUG #17061: Impossible to query the fields of the tuple created by SEARCH BREADTH FIRST BY .. SET ..

From: talk to ben <blo(dot)talkto(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Subject: Re: BUG #17061: Impossible to query the fields of the tuple created by SEARCH BREADTH FIRST BY .. SET ..
Date: 2021-07-01 12:05:52
Message-ID: CAPE8EZ6X17TeALvsA-YFaJesLJYaUY7fseBBnDvqFgNUNQTa8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jun 17, 2021 at 4:50 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> [ screwed up the cc somehow the first time, sorry for the duplicate ]
>
> PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> > WITH RECURSIVE mtree(id, name) AS ( ...
> > ) SEARCH BREADTH FIRST BY id SET breadth
> > SELECT (breadth)."*DEPTH*"
> > FROM mtree m;
> > ERROR: CTE m does not have attribute 3
>
> Yeah, I get that with "SELECT (breadth).*" as well. I'm not entirely sure
> what this silly-looking syntax is supposed to mean, but it seems to be
> adding an output column named "breadth" to the CTE. The error is
> occurring because said column has not been added to the relevant
> CommonTableExpr struct. Peter?
>
> regards, tom lane
>

Quick update : I checked if BETA2 somehow fixed it, it didn't.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2021-07-01 17:39:24 BUG #17079: btree_gin and type coersion combination doesn't work
Previous Message David G. Johnston 2021-07-01 06:30:10 Re: BUG #17073: docs - "Improve signal handling reliability"