tlocke / pg8000

A Pure-Python PostgreSQL Driver
BSD 3-Clause "New" or "Revised" License
515 stars 46 forks source link

Another suggestion for PostgreSQL native parameters #166

Closed bjorkegeek closed 1 month ago

bjorkegeek commented 1 month ago

Here's another suggestion for how to do PostgreSQL native parameters. It avoids unnecessary local parsing of the SQL string and provides a way of passing the values that mirrors the numbers in the string.

tlocke commented 1 month ago

Hi @bjorkegeek, thanks for your patch. My feeling at the moment is that this approach adds complexity to the API which I'd rather avoid. As it stands I can explain how parameters work relatively easily to people.

bjorkegeek commented 1 month ago

I understand. Thank you for considering it.