Re: BUG #18443: jsonb_agg issue. Again. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18443: jsonb_agg issue. Again.
Date
Msg-id 2176812.1713549143@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18443: jsonb_agg issue. Again.  (Ц <pfunk@mail.ru>)
List pgsql-bugs
=?UTF-8?B?0KY=?= <pfunk@mail.ru> writes:
>> You wrote a table-producing function (one row but three columns).  Those need [1] to be executed in the FROM clause,
viaan implicit or explicit LATERAL join if you have data from other relations being fed in as input arguments. 
>>
>> 1. well, at least if you don't want to see this kind of artifact where the way to expand .* is to copy the
expressionpreceding it. 

> Do you mean select (out3).* .. equal to select (out3).col1, (out3).col3, (out3).col3 … ?
> Didn`t even suppose that..
> Sometimes I've used (row).col or (row).* in select list.
> Would be appreciated if you could provide keywords for googling.

The main documentation about SELECT lists is

https://www.postgresql.org/docs/current/queries-select-lists.html

which points you to

https://www.postgresql.org/docs/current/rowtypes.html#ROWTYPES-USAGE

where there's a Tip explaining exactly this point.

            regards, tom lane




pgsql-bugs by date:

Previous
From: Ц
Date:
Subject: Re: BUG #18443: jsonb_agg issue. Again.
Next
From: David Rowley
Date:
Subject: Re: BUG #18442: Unnecessary Sort operator in indexScan Plan