From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Slawomir Nowakiewicz <slawomir(dot)nowakiewicz(at)rubix(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #16549: "CASE" not work properly , the function works properly on PostgreSQL 9.6.8 |
Date: | 2020-07-23 04:55:16 |
Message-ID: | CAFj8pRDRbbyC_Wq-U=Q+UVDqoNeMZBHdsW5wy87MyfggLAyeeQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
čt 23. 7. 2020 v 0:17 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> > What is interesting - it fails only when the subquery is in CASE
> condition
> > expression. If is somewhere else, then it doesn't fail
>
> If eval_const_expressions can simplify the CASE test condition itself
> to constant-true or constant-false, then it throws away the unreachable
> result expression(s) without const-simplifying them. So even if there
> would have been a run-time error there, you don't see it.
>
> Of course the error can only happen because we're trying to generate a
> custom plan for the expression (with plpgsql variable values inserted
> as constants not params). That's a bit silly in this example, but
> it wouldn't happen if there weren't a sub-SELECT in the expression.
> That forces use of the full planner and plancache machinery.
>
Thank you for explanation
Regards
Pavel
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Slawomir Nowakiewicz | 2020-07-23 06:49:30 | RE: BUG #16549: "CASE" not work properly , the function works properly on PostgreSQL 9.6.8 |
Previous Message | Michael Paquier | 2020-07-22 23:36:55 | Re: BUG #16476: pgp_sym_encrypt_bytea with compress-level=6 : Wrong key or corrupt data |