Closed kerams closed 2 years ago
Hmm well there are 4 statements, but only 3 queries :(
Von meinem iPhone gesendet
Am 27.02.2020 um 7:53 AM schrieb kerams notifications@github.com:
use cmd = Db.CreateCommand<"begin; update section set ord = ord + 1 where deck_id = @deck_id and ord >= @order; update section set ord = @order where id = @sectionId; commit;">(cs) Npgsql supposedly reports there are 4 statements in this command, but neither begin nor end should have a result set of their own even though there is no problem at runtime.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I did some digging in the bowels of Npgsql and it looks like Postgres gives no indication about the type of individual statements when getting schema. So while this issue is mildly annoying, I don't see a solution that would be worth the trouble...
Actually, there is one dirty thing we could do - use a simple regex to filter out 'control' statements and such.
The path of writing a quick and dirty sql parser Leads straight to hell. Might give feedback to the nice npgsql folks. They have been helpful in past when we’ve raised things that would be useful to have
Von meinem iPhone gesendet
Am 29.02.2020 um 9:09 AM schrieb kerams notifications@github.com:
Actually, there is one dirty thing we could do - use a simple regex to filter out 'control' statements and such.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Unfortunately, this is a limitation of Postgres itself :/. More in the comments https://github.com/npgsql/npgsql/issues/2873
Npgsql supposedly reports there are 4 statements in this command, but neither begin nor end should have a result set of their own even though there is no problem at runtime.
https://github.com/npgsql/npgsql/issues/2873