Using psql, I can create save an instance of a model like this:
my_model:save(my_model:new_with([{name,"1"}])).
But if I try to save the same model inside of a transaction, like this:
my_model:transaction(fun() ->
my_model:save(my_model:new_with([{name,"1"}]))
end).
I get the SQL error:
{atomic,{ok,{sql_error,"25P02",
"Rexec_simple_query L928 Fpostgres.c Mcurrent
transaction is aborted, commands ignored until end of transaction
block"}}}
At least the error is atomic!
1. Why doesn't the process die, rather than returning "OK"?
2. Why can't I do this inside of a transaction?
3. Is anybody actually running against psql? Has anybody tested this
driver?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---