Skip to content

Conversation

@nicferrier
Copy link

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.

@will
Copy link
Owner

will commented Dec 30, 2017

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?

@waghanza
Copy link
Contributor

@nicferrier Time to complete this PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants