crystal-pg icon indicating copy to clipboard operation
crystal-pg copied to clipboard

#112 attempted fix

Open nicferrier opened this issue 7 years ago • 2 comments

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.

nicferrier avatar Dec 30 '17 01:12 nicferrier

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?

will avatar Dec 30 '17 03:12 will

@nicferrier Time to complete this PR ?

waghanza avatar Sep 11 '19 08:09 waghanza