Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxsPa-00Ci6V-UL for pgsql-bugs@arkaria.postgresql.org; Fri, 19 Apr 2024 17:52:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rxsPZ-004JP0-19 for pgsql-bugs@arkaria.postgresql.org; Fri, 19 Apr 2024 17:52:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxsPY-004JOr-MZ for pgsql-bugs@lists.postgresql.org; Fri, 19 Apr 2024 17:52:32 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxsPR-003eLn-Pa for pgsql-bugs@lists.postgresql.org; Fri, 19 Apr 2024 17:52:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 43JHqNB12176813; Fri, 19 Apr 2024 13:52:23 -0400 From: Tom Lane To: =?UTF-8?B?0KY=?= cc: =?UTF-8?B?RGF2aWQgRy4gSm9obnN0b24=?= , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18443: jsonb_agg issue. Again. In-reply-to: <1713547274.939623732@f335.i.mail.ru> References: <18443-bd015c763e3196ca@postgresql.org> <1713547274.939623732@f335.i.mail.ru> Comments: In-reply-to =?UTF-8?B?0KY=?= message dated "Fri, 19 Apr 2024 20:21:14 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2176811.1713549143.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 19 Apr 2024 13:52:23 -0400 Message-ID: <2176812.1713549143@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =3D?UTF-8?B?0KY=3D?=3D writes: >> You wrote a table-producing function (one row but three columns).=C2=A0= Those need [1] to be executed in the FROM clause, via an implicit or expl= icit LATERAL join if you have data from other relations being fed in as in= put 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=C2=A0(out3).* ..=C2=A0equal to=C2=A0select=C2=A0(out3= ).col1,=C2=A0(out3).col3,=C2=A0(out3).col3 =E2=80=A6=C2=A0? > Didn`t even suppose that.. > Sometimes I've used (row).col or (row).*=C2=A0in 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