Re: contrib: hack for psycopg2 performance

Marko Kreen <[email protected]> Thu, 13 May 2010 13:47:42 +0300
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
On 5/13/10, Daniele Varrazzo <[email protected]> wrote:
> On Thu, May 13, 2010 at 8:55 AM, Marko Kreen <[email protected]> wrote:
>  > Why make things complicated?  How about the following:
>  >
>  > 1) No arguments - PQexec
>  > 2) Has arguments - PQexecParams
>  >
>  > How common are multi-statement parametrized queries anyway?
>
>
> -1 for breaking existing features in a module that's been in use for
>  some 10 years. I wouldn't do it for introducing an useful feature such
>  as nextset(), even less to simplify an implementation.

In that case, separate argument to connection or cursor constructor?

And instead of toggling PQexecParams always-on, I'd suggest using
the above logic, so it would be usable in more situations.

Then old code keeps working and new code can default to better
argument handling.

-- 
marko