Re: Query with boolean parameter

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Paolo De Stefani <paolo(at)paolodestefani(dot)it>
Cc: Psycopg <psycopg(at)postgresql(dot)org>
Subject: Re: Query with boolean parameter
Date: 2022-03-19 16:35:08
Message-ID: FDFFF1ED-3355-4A1B-9EAE-53724D0EBA55@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

> On Mar 19, 2022, at 05:10, Paolo De Stefani <paolo(at)paolodestefani(dot)it> wrote:
> Switching to psycopg 3 i have to consider many more differences than i expected

There have been some changes in the way psycopg2 does parameter substitution, although that one is an interesting case! You might consider using IS DISTINCT FROM as Daniele suggested, or just =, depending on how you want nulls handled.

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Adrian Klaver 2022-03-19 17:34:32 Re: Query with boolean parameter
Previous Message Daniele Varrazzo 2022-03-19 13:43:19 Re: Query with boolean parameter