On 02/21/2014 08:27 AM, W. Matthew Wilson wrote:
> 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?
Now I see what I was missing. I did not read the subject fully and see
you wanted to use copy_expert. In that situation, I do as Federico
suggested and build the full query first then pass it to copy_expert.
>
> Thanks in advance.
>
> Matt
>