Re: AW: BUG #18189: Value partitioned tables: Upd ERROR: more than one row returned by a subquery used as an expression - Mailing list pgsql-bugs

From Tom Lane
Subject Re: AW: BUG #18189: Value partitioned tables: Upd ERROR: more than one row returned by a subquery used as an expression
Date
Msg-id 1605685.1699746206@sss.pgh.pa.us
Whole thread Raw
List pgsql-bugs
Hans Buschmann <buschmann@nidsa.net> writes:
> I sent a "reply to all" mail after I received the Bug-reporting mail (WHY after a longer time of clearance??)
yesterdayat 15:50 CET. 
> It contained all 5 attachments just under 10 MB and I received the the copy sent to myself. So I thought all is OK.
> Today I noticed,  that this mail doesn't appear in buglist #18189 and totally disappeared for the community !!!
> It seems there are mechanisms behind the scenes, that are not documented nor obvious for gentle users trying to
amelioratethe software... 

I think those messages are just hung up in moderation.  If you're
not subscribed to pgsql-bugs, whatever you send will be held for
moderator approval (a sadly-necessary spam defense).

Anyway, the error is coming out of this bit:

,qoffs as (
select
 ...
,(((((ra -(select ra_base from qsum))*1000000000000)::bigint)>>15)&((1::bigint<<31)-1))::int as ira
 ...

"(select ra_base from qsum)" certainly is a "sub-select used as an
expression", and I guess the difference between your smaller and
larger datasets is how many rows the qsum CTE produces.  If I'm
reading it right, that'll produce one row for each distinct value
of "(source_id >> 35+12)&((1<<16)-1)".

            regards, tom lane



pgsql-bugs by date:

Previous
From: Hans Buschmann
Date:
Subject: AW: BUG #18189: Value partitioned tables: Upd ERROR: more than one row returned by a subquery used as an expression
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #18190: PL/pgSQL does not document comparison operations on RECORD (or ROW) types