how to pass in bind variables with cursor.copy_expert? - Mailing list psycopg

From W. Matthew Wilson
Subject how to pass in bind variables with cursor.copy_expert?
Date
Msg-id CAGHfCUAW+MLKFJuTz7t=m+b7oNAArEvo7ip1tkeAgyrXpqC7Tg@mail.gmail.com
Whole thread Raw
Responses Re: how to pass in bind variables with cursor.copy_expert?  (Federico Di Gregorio <fog@dndg.it>)
Re: how to pass in bind variables with cursor.copy_expert?  (Adrian Klaver <adrian.klaver@aklaver.com>)
List psycopg
I need to extract some rows from a table as a CSV file, based on a
query sort of like:

    copy (
        select *
        from blah
        where x = %(x)s
    )

but I don't see how to pass in a dictionary with values for the query!

Is this not allowed?

What am I missing?

Thanks in advance.

Matt

--
W. Matthew Wilson
matt@tplus1.com
http://tplus1.com


psycopg by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: Differentiating various OperationalError 'states'
Next
From: Federico Di Gregorio
Date:
Subject: Re: how to pass in bind variables with cursor.copy_expert?