Re: Unpacking a Python list in a query. - Mailing list psycopg

From Sukhbir Singh
Subject Re: Unpacking a Python list in a query.
Date
Msg-id BANLkTim+DORxOWLR64m_TWOCyEt4AWBbOw@mail.gmail.com
Whole thread Raw
In response to Re: Unpacking a Python list in a query.  (Israel Ben Guilherme Fonseca <israel.bgf@gmail.com>)
List psycopg
Hi,

> execute("UPDATE foobartable SET name = 'FooBar' WHERE name in (%s)",
> (tuple(yourlist),))
>
> That should work.

I get this error:

    psycopg2.ProgrammingError: arguments of row IN must all be row expressions
    LINE 1: UPDATE listarchives SET name='FooBar' WHERE name in ((E'Foo...

I am passing a tuple only.

psycopg by date:

Previous
From: Israel Ben Guilherme Fonseca
Date:
Subject: Re: Unpacking a Python list in a query.
Next
From: Sukhbir Singh
Date:
Subject: Re: Unpacking a Python list in a query.