On Wed, May 22, 2019 at 11:01:12PM +0200, Christoph Zwerschke wrote:
> 
> Am 22.05.2019 um 21:00 schrieb Justin Pryzby:
> > It looks like this doesn't work correctly.
> > query_prepared sends it sargumens to postgres without adaptation.
> 
> Only the query_formatted() method adapts the parameters, that's right.
> query() and query_prepared() pass them as strings.
>
> You need to adapt the parameters manually with db.adapter.adapt().

Thanks for the lesson :)

> Not sure what we should do about it? Just better documentation?

I guess the opened question in my mind is exactly which types need/not be
adapted?  For our purposes, I can call "v if type(v)!=list else adapt(v)", but
what's the general incantation ??

Justin
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo/pygresql

Reply via email to