public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Björn Kautler <[email protected]>
Cc: Tender Wang <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Laurenz Albe <[email protected]>
Subject: Re: GROUP BY in CTE causes ELSE in outer query to be prematurely evaluated
Date: Wed, 4 Mar 2026 12:32:04 -0700
Message-ID: <CAKFQuwZT0UaOiV+2h6f42_U_tU34wXH3Gv8BrjF_U168SWS5PQ@mail.gmail.com> (raw)
In-Reply-To: <CAKChYSrNec-ucGwK+-gjCGGSkcq1EFxi6C3RBCz5+-DwS2feJg@mail.gmail.com>
References: <CAKChYSo2n2_q_XtvO-3ow+Q0dSuWdzwydLbtr3Q12X65bqhL=g@mail.gmail.com>
<CAHewXNnVarUKNXrJXyDH=PKs-wST7bMzyqg61_SA2Mo5PPePgw@mail.gmail.com>
<CAKChYSrNec-ucGwK+-gjCGGSkcq1EFxi6C3RBCz5+-DwS2feJg@mail.gmail.com>
On Wednesday, March 4, 2026, Björn Kautler <[email protected]> wrote:
>
> What I tried to do was to provoke the division-by-zero error if I happened
> to forget some WHEN branch as this is a bug.
> Is there some safe way to do something like this you are aware of
>
Write a volatile “fail()” plpgsql function, and call it in the else block.
Raise exception there.
David J.
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: GROUP BY in CTE causes ELSE in outer query to be prematurely evaluated
In-Reply-To: <CAKFQuwZT0UaOiV+2h6f42_U_tU34wXH3Gv8BrjF_U168SWS5PQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox