Repository navigation
Fix behavior around failing to prepare statements - #2806
Conversation
|
@YohDeadfall I discovered another related bug (#2820), can you take another look at this? |
There was a problem hiding this comment.
This could be rewritten using if:
if (completedMsg.Code = BackendMessageCode.CompletedResponse ||
completedMsg.Code = BackendMessageCode.EmptyQueryResponse)
{
ProcessMessage(completedMsg);
break;
}
else
continue;Not so important because saves only one line.
There was a problem hiding this comment.
The switch could actually be more efficient (possibly translated to a jump table by the compiler) :) Will leave as-is as you don't seem to mind.
There was a problem hiding this comment.
if (msg.Code != BackendMessageCode.CompletedResponse &&
msg.Code != BackendMessageCode.EmptyQueryResponse)
{
throw Connector.UnexpectedMessageReceived(msg.Code);
}There was a problem hiding this comment.
As above, I use switches for these cases mainly because of (theoretical) perf.
|
Let's rebase it on top of the |
| using (var command = new NpgsqlCommand("INSERT INTO test_table (id) VALUES (1)", conn)) | ||
| { | ||
| command.ExecuteNonQuery(); | ||
| command.ExecuteNonQuery(); |
There was a problem hiding this comment.
Is there a reason you're executing twice here?
|
We seem to be running into #2665 and are wondering if this is held up for some reason? We could really use this fix please. |
|
@cdaragorn this fix was merged a long time ago - for 4.1.3. Can you please open a new issue with a minimal code sample for your problem? |
Fixes #2665
Fixes #2820