Re: [psycopg] speed concerns with executemany()
| От | Jim Nasby |
|---|---|
| Тема | Re: [psycopg] speed concerns with executemany() |
| Дата | |
| Msg-id | f5027958-d5f9-181b-8b4a-be081170fdc3@BlueTreble.com обсуждение исходный текст |
| Ответ на | Re: [psycopg] speed concerns with executemany() (Daniele Varrazzo <daniele.varrazzo@gmail.com>) |
| Ответы |
Re: [psycopg] speed concerns with executemany()
|
| Список | 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 по дате отправления: