On Fri, Jan 04, 2019 at 12:03:13AM +0100, Christoph Zwerschke wrote:
> 1. The order of params is now different from the underlying C function where
> the name comes first which could be confusing.

Doesn't matter at all except maybe to pygres developers, right ?
Or postgres developers who happen to be using pygres.

> 2. People might be tempted to leave out the name when calling
> query_formatted() with arguments, but then the first argument would be
> interpreted as the name. This may cause unexpected errors.

You mean query_prepred with args ?

I suggest it should actually be:

|+    def query_prepared(self, *args, **kwargs):
|+    def prepare(self, command, **kwargs):

name=kwargs.get('name', '')

So one *has* to pass name as named param.

Justin
_______________________________________________
PyGreSQL mailing list
PyGreSQL@Vex.Net
https://mail.vex.net/mailman/listinfo/pygresql

Reply via email to