Re: [postmodern-devel] Postgres transaction warnings and save-dao

2010-03-09 Thread Peter Stiernström
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marijn Haverbeke wrote: > Hey Daniel, > > I'd say something like this works best as a project-local hack, rather > than part of the library interface. The user can perfectly well do > (execute "begin") outside of the macro, causing the *transaction* >

Re: [postmodern-devel] Postgres transaction warnings and save-dao

2010-03-09 Thread Marijn Haverbeke
Hey Daniel, I'd say something like this works best as a project-local hack, rather than part of the library interface. The user can perfectly well do (execute "begin") outside of the macro, causing the *transaction* variable to no longer reflect the actual situation. Best, Marijn ___

Re: [postmodern-devel] Postgres transaction warnings and save-dao

2010-03-09 Thread Daniel White
I've also had the need for determining the state of a transaction. Previously, I'd defined a local WITH-TRANSACTION macro that bound a special variable *TRANSACTION* with the transaction in progress. I have attached a patch that does just that. WITHIN-TRANSACTION-P will return T if a transaction

Re: [postmodern-devel] Postgres transaction warnings and save-dao

2010-03-09 Thread Daniel White
On Tue, Mar 9, 2010 at 10:16 PM, Marijn Haverbeke wrote: > > I'd say something like this works best as a project-local hack, rather > than part of the library interface. The user can perfectly well do > (execute "begin") outside of the macro, causing the *transaction* > variable to no longer refle

Re: [postmodern-devel] Postgres transaction warnings and save-dao

2010-03-09 Thread Marijn Haverbeke
Hello Peter, It seems that transaction was a misguided attempt (apparently I believed postgres supported nested transactions at the time) to prevent the failure to insert from abandoning the transaction. I think the cleanest solution at this point is to add a variant, save-dao/transaction, that us

[postmodern-devel] Postgres transaction warnings and save-dao

2010-03-09 Thread Peter Stiernström
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm using postmodern with great success but I keep seeing these two warnings in my log: - "Postgres warning: there is no transaction in progress" - "Warning while processing connection: Postgres warning: there is already a transaction in pr