how to pass in bind variables with cursor.copy_expert?

Поиск
Список
Период
Сортировка
От W. Matthew Wilson
Тема how to pass in bind variables with cursor.copy_expert?
Дата
Msg-id CAGHfCUAW+MLKFJuTz7t=m+b7oNAArEvo7ip1tkeAgyrXpqC7Tg@mail.gmail.com
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: Differentiating various OperationalError 'states'
Следующее
От: Federico Di Gregorio
Дата:
Сообщение: Re: how to pass in bind variables with cursor.copy_expert?