Re: Fwd: Timestamp Query Parameters - Mailing list psycopg

From Adrian Klaver
Subject Re: Fwd: Timestamp Query Parameters
Date
Msg-id 5322320F.5080107@aklaver.com
Whole thread Raw
In response to Fwd: Timestamp Query Parameters  (Ari King <ari.brandeis.king@gmail.com>)
List psycopg
On 03/13/2014 03:30 PM, Ari King wrote:
>     Probably should have mentioned before:
>
>       mogrify(operation[, parameters])
>
>          Return a query string after arguments binding. The string
>     returned is exactly the one that would be sent to the database
>     running the execute() method or similar.
>
>     So mogrify does not actually run against the database. I was
>     assuming you where doing an execute() later which may be an
>     erroneous assumption. To use parameters in execute() see here:
>
>     http://initd.org/psycopg/docs/usage.html#passing-parameters-to-sql-queries
>
>
> Thanks for the clarification. I was successful in using mogrify wrapped
> in execute. Passing parameters to SQL queries via execute still won't
> work for me though. Thoughts?

Crank up the statement logging in postgresql.conf to 'all' and see what
is actually hitting the database.

>
> -Ari
>


--
Adrian Klaver
adrian.klaver@aklaver.com


psycopg by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Fwd: Timestamp Query Parameters
Next
From: Lutz Steinborn
Date:
Subject: Re: Fwd: Timestamp Query Parameters