Re: Fwd: Timestamp Query Parameters

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Ari King <ari(dot)brandeis(dot)king(at)gmail(dot)com>
Cc: "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: Re: Fwd: Timestamp Query Parameters
Date: 2014-03-13 22:17:54
Message-ID: 53222E92.6050100@aklaver.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: psycopg

On 03/13/2014 03:11 PM, Ari King wrote:
> Do not quote the %s.
>
>
> Thanks for the suggestion, but unquoting the %s did not solve the issue.

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

>
> -Ari
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Adrian Klaver 2014-03-13 22:32:47 Re: Fwd: Timestamp Query Parameters
Previous Message Adrian Klaver 2014-03-13 21:57:30 Re: Fwd: Timestamp Query Parameters