psycopg2 icon indicating copy to clipboard operation
psycopg2 copied to clipboard

added helpful executemany & execute_batch examples

Open kannes opened this issue 5 years ago • 2 comments

hopefully this will make those functions more approachable for newbies. everyone tries it without proper sequences and then has to google.

kannes avatar Jan 16 '19 15:01 kannes

I would prefer if the style of the examples was canonical (space after the commas etc) and that the single values example was shown with tuples instead of lists (because one-item tuples are a thing that tricks a lot of newcomers).

dvarrazzo avatar Jan 17 '19 11:01 dvarrazzo

I'd thought about that but I did not really see a reason why tuples were preferred anyways. I will update it though.

kannes avatar Jan 18 '19 08:01 kannes

I will make a new PR with those changes.

kannes avatar Oct 10 '22 17:10 kannes

Deprecated, closing in favor of https://github.com/psycopg/psycopg2/pull/1508

kannes avatar Oct 10 '22 17:10 kannes