From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PetSerAl <petseral@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: PL/pgSQL THEN binging in condition
Date: Tue, 17 Sep 2024 16:00:02 -0400
Message-ID: <1681151.1726603202@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFj8pRD2uadHhmUy6y1R65nu1z4tXWVTyXz_689WeaiXO4p_BQ@mail.gmail.com>
References: <CAKygsHSpPYjBuh=02bdwSHMSa2RZwwn7fxUKirGYB67SMj1Sbg@mail.gmail.com>
<CAFj8pRD2uadHhmUy6y1R65nu1z4tXWVTyXz_689WeaiXO4p_BQ@mail.gmail.com>
Pavel Stehule <pavel.stehule@gmail.com> writes:
> Ășt 17. 9. 2024 v 20:04 odesĂlatel PetSerAl <petseral@gmail.com> napsal:
>> It seems error here because first THEN bound to IF statement rather than
>> CASE expression.
> It is an interesting use case, but I am afraid it can be fixed (enhanced)
> without a strong rewrite of the plpgsql engine.
It would not be that hard to teach read_sql_construct to count nesting
of CASE ... END, as it already does for parentheses. However, I'm a
little worried whether that'd interact badly with plpgsql's own uses
of CASE and END.
regards, tom lane
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, pavel.stehule@gmail.com, petseral@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: PL/pgSQL THEN binging in condition
In-Reply-To: <1681151.1726603202@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