p1_pgsql icon indicating copy to clipboard operation
p1_pgsql copied to clipboard

let extended queries handle empty responses

Open oxpa opened this issue 5 years ago • 4 comments

Some queries return empty data sets. In case extended query mechanism was used - whole process would be hung in a 'receive' with no results. This patch lets p1_pgsql handle such queries and return back to 'ready for query' state.

oxpa avatar Aug 11 '20 16:08 oxpa

Hi @oxpa, many thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes.

p1bot avatar Aug 11 '20 16:08 p1bot

You did it @oxpa!

Thank you for signing the ProcessOne Contribution License Agreement.

We will have a look at your contribution!

p1bot avatar Aug 11 '20 16:08 p1bot

This library is used by ejabberd, and its tests didn't report any problem.

badlop avatar Aug 13 '20 16:08 badlop

I've submitted a pull request to ejabberd to use this patch. But by the time I made it there was an alternative implementation using E'' syntax. I'm not really sure which approach is better because this uses anonymous prepared statement under the hood and I know to little about E'' escaping in postgres to make educated comparison.

oxpa avatar Aug 13 '20 20:08 oxpa