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().
Not sure what we should do about it? Just better documentation?
Automatically adapt in query() and query_prepared()? But it would good
to have the "raw" queries as well for performance and cases where the
adaptation does not work. Also, it should be possible to pass types for
adaptation like in query_formatted - otherwise the types are guessed
from the Python types, this might be slower and not always work properly
when there is ambiguity in rare cases with special types.
-- Christoph
_______________________________________________
PyGreSQL mailing list
PyGreSQL@Vex.Net
https://mail.vex.net/mailman/listinfo/pygresql