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
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
> 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
> 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
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
> 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 operators, so you can't
construct them that w
Hi all
Regarding query and parameter binding in psycopg3:
cur.execute('SELECT * FROM system.app_user WHERE can_edit_views = %s',
(True,))
user=postgres database=test4) at 0x127b7f0>
cur.execute('SELECT * FROM system.app_user WHERE can_edit_views IS %s',
(True,))
Traceback (most recent call las