[DB-SIG] Some obscurity with paramstyle

Federico Di Gregorio federico.digregorio at dndg.it
Mon Jul 18 11:28:55 CEST 2011

On 18/07/11 11:25, James Henstridge wrote:
> If all adapters that support transactions function like that, then I
> think it would be sensible to require them to raise an error in that
> case.  If they don't raise an error, you know that someone somewhere
> is going to write code like the following:
>     with transaction:
>         # do stuff
>         with transaction:
>             # do more stuff
> ... and wonder why things break.

This can make sense for backends that support check points
(subtransactions). PostgreSQL is an example (even if we don't yet
support checkpoints in psycopg).


Federico Di Gregorio                         federico.digregorio at dndg.it
Studio Associato Di Nunzio e Di Gregorio                  http://dndg.it
             Quis custodiet ipsos custodes? -- Juvenal, Satires, VI, 347

More information about the DB-SIG mailing list