Re: "Naked" typecast functions?

Peter Sabaini <peter-Di7OsXwWAkqzZXS1Dc/[email protected]> Thu, 22 Apr 2010 14:10:36 +0200
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
On Thu, 2010-04-22 at 13:59 +0200, Federico Di Gregorio wrote:
> On 22/04/2010 12:23, Peter Sabaini wrote:
> >> What do you mean by "the other way around"? Typecasters work exactly
> >> > this way, they convert from PostgreSQL (string representation) to
> >> > Python. Btw, use psycopg2.extensions, not psycopg2._psycopg.
> > I'd like to convert parameters from their Python representation to a
> > representation suitable for passing to Postgres. Sorry for the
> > mixed-terminology...
> 
> Ah, then adapt() them. But you'll need a cursor even more than before
> because the connection encoding is needed for every conversion.

Ok, makes sense. Thank you!

peter.
(cc-ing the list again...)

> federico
>