Re: Query with boolean parameter

2022-03-19 Thread Paolo De Stefani
Il 19/03/2022 17:35 Christophe Pettus ha scritto: On Mar 19, 2022, at 05:10, Paolo De Stefani 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 interestin

Re: Query with boolean parameter

2022-03-19 Thread Adrian Klaver
On 3/19/22 05:10, Paolo De Stefani wrote: Il 19/03/2022 01:00 Christophe Pettus ha scritto: On Mar 18, 2022, at 16:56, Paolo De Stefani wrote: Is there any reason why the second query results in a syntax error? There's not IS operator in PostgreSQL (or in SQL).  IS NULL, IS NOT NULL, IS TRUE

Re: Query with boolean parameter

2022-03-19 Thread Christophe Pettus
> On Mar 19, 2022, at 05:10, Paolo De Stefani 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 DISTIN

Re: Query with boolean parameter

2022-03-19 Thread Daniele Varrazzo
> Il 19/03/2022 01:00 Christophe Pettus ha scritto:> >> On Mar 18, 2022, at > 16:56, Paolo De Stefani > >> wrote: > >> Is there any reason why the second query results in a syntax error? > > > > There's not IS operator in PostgreSQL (or in SQL). IS NULL, IS NOT > > NULL, IS TRUE, and IS FALSE ar

Re: Query with boolean parameter

2022-03-19 Thread Paolo De Stefani
Il 19/03/2022 01:00 Christophe Pettus ha scritto: On Mar 18, 2022, at 16:56, Paolo De Stefani wrote: Is there any reason why the second query results in a syntax error? There's not IS operator in PostgreSQL (or in SQL). IS NULL, IS NOT NULL, IS TRUE, and IS FALSE are in effect unary postfix