Re: [psycopg] speed concerns with executemany() - Mailing list psycopg

From Jim Nasby
Subject Re: [psycopg] speed concerns with executemany()
Date
Msg-id f5027958-d5f9-181b-8b4a-be081170fdc3@BlueTreble.com
Whole thread Raw
In response to Re: [psycopg] speed concerns with executemany()  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Responses Re: [psycopg] speed concerns with executemany()  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
List psycopg
On 1/31/17 6:21 PM, Daniele Varrazzo wrote:
> ISTM that it's easier to leave the users to call
> PREPARE/execute_batch('EXECUTE')/DEALLOCATE: knowing the context in
> which the sequence is called wouldn't require parameters mangling and
> the error management would be simpler for them.

I think a context handler for prepare would be very handy, so that you
didn't need to remember to dealloc. There might be a way to avoid the
separate prepare too.

I agree that trying to magically convert % to $ and back is nothing but
trouble. If users are using prepared statements, they need to understand
the $ syntax.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)


psycopg by date:

Previous
From: Aryeh Leib Taurog
Date:
Subject: Re: [psycopg] speed concerns with executemany()
Next
From: Daniele Varrazzo
Date:
Subject: Re: [psycopg] speed concerns with executemany()