Skip site navigation (1) Skip section navigation (2)

Re: Using real libpq parameters

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: Using real libpq parameters
Date: 2011-02-27 10:58:53
Message-ID: AANLkTi=dVyvrDqAU9T1w+bX=JNYB2qaHJwQVn3==LDA-@mail.gmail.com (view raw or flat)
Thread:
Lists: psycopg
On Sun, Feb 27, 2011 at 10:49 AM, Daniele Varrazzo
<daniele(dot)varrazzo(at)gmail(dot)com> wrote:

>  char *paramValues[PySequence_Size(t)];
>  for (i = 0; i < PySequence_Size(t); i++) {
>    paramValues[i]

That should have been something like:

      paramValues[i] = PyString_AsString(PySequence_GetItem(t, i));

>  }
>  PQexecParams(query, ..., paramValues, ...);

-- Daniele

In response to

psycopg by date

Next:From: Federico Di GregorioDate: 2011-02-27 11:40:00
Subject: Re: Using real libpq parameters
Previous:From: Daniele VarrazzoDate: 2011-02-27 10:49:46
Subject: Re: Using real libpq parameters

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group