crystal-pg
crystal-pg copied to clipboard
#112 attempted fix
I was having problems with RETURNING statements (like an INSERT returning the id of the created row) but it turned out that it was just a problem with async notifications breaking the flow as illustrated.
Basically, what I was getting was notices from a trigger function that happen on the insert. These appear before the DataRow that encapsulate the RETURNING.
Maybe this is a bit messy. But it works.
I suspect that there's a much better way of dealing with the async messages.
Thanks for sending this in. I'm traveling this week and won't be able to properly take a look at this before the new year.
Could you please also add a test that fails without this change to pq::connection and passes with it to make sure it doesn't regress again in the future?
@nicferrier Time to complete this PR
?