Postgresql transactions

0 views
Skip to first unread message

M Foley

unread,
Aug 31, 2008, 7:41:51 PM8/31/08
to erlyweb
Has anybody had any luck getting transactions to work with postgresql
and the erlydb_psql driver?

I am getting the same error as David King pointed out in this post:
"erlydb_psql transactions appear broken"
http://groups.google.com/group/erlyweb/browse_thread/thread/ffadbc40c392dfc6#


So, far I have some basic stuff working with erlydb, but I'm still
just learning. I'm hoping to make use of erlyweb to develop a web
interface to the postgresql database we are building. Transactions
are needed for my application.

Thanks for any help,
Michael

M Foley

unread,
Aug 31, 2008, 11:23:14 PM8/31/08
to erlyweb
Might have solved my own problem. At least this initial problem I was
having anyway. I can make simple transactions work now.

The problem, I think is this:
The problem was that an earlier command I was testing in the shell had
crashed. This left the connection to the database in the middle of a
transaction. If I send a erlydb_psql:q2("commit;"). or
erlydb_psql:q2("rollback;"). then it seems to put things back on
track. This would have probably also been solved by restarting the
shell and db connection.

It looks like the erlydb_psql driver is not handling errors, and
rolling back the transaction when things break in the middle.


Cheers,
Michael

Reply all
Reply to author
Forward
0 new messages