Re: Me again with an insert trigger problem

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Me again with an insert trigger problem
Date: 2024-02-27 23:23:00
Message-ID: 585b9dd4-1b82-4d71-aecf-1bf8503b5889@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2/27/24 14:38, Thiemo Kellner wrote:
>
> Am 27.02.2024 um 23:20 schrieb Adrian Klaver:

>
> I am not sure, what you want me to show with your test case. And I am
> not sure whether I could not make myself clear. Please bear with me if I
> try to make things clearer with an example.

Your comment was:

"Coming from Oracle, I missed that using "true" is also possible and
better because clearer."

Just showing true is available in Postgres also.

>
> -- bit-harder-to-test-statement
> select count(*)
>   from TRUE_TEST
>  where ID < 100  -- if I want to deactivate that part of the clause, I
> have to rewrite
>    and mod(ID, 5) = 0;
>
> -- bit-easier-to-test-statement
> select count(*)
>   from TRUE_TEST
>  where true
>    and ID < 100  -- if I want to deactivate that part of the clause, I
> just comment it out
>    and mod(ID, 5) = 0
>    and true;
>
> Cheers
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mark Schloss 2024-02-28 03:23:37 RE: walreceiver fails on asynchronous replica [EXTERNAL] [SEC=UNOFFICIAL]
Previous Message Thiemo Kellner 2024-02-27 22:38:54 Re: Me again with an insert trigger problem