pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ц <pfunk@mail.ru>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18443: jsonb_agg issue. Again.
Date: Fri, 19 Apr 2024 13:52:23 -0400
Message-ID: <2176812.1713549143@sss.pgh.pa.us> (raw)
In-Reply-To: <1713547274.939623732@f335.i.mail.ru>
References: <18443-bd015c763e3196ca@postgresql.org>
	<CAKFQuwY4SWR6WqUp5DwauLMumJhr71+FFcY-qMFLFMqfq+fCzg@mail.gmail.com>
	<1713547274.939623732@f335.i.mail.ru>

=?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, via an 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 expression preceding 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






view thread (5+ messages)

Message-ID: <2176812.1713549143@sss.pgh.pa.us>
Permalink:  ../2176812.1713549143@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2176812.1713549143@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pfunk@mail.ru, david.g.johnston@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18443: jsonb_agg issue. Again.
  In-Reply-To: <2176812.1713549143@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox