refactor(data): pin server output settings and guard busy connections

Pin bytea_output=hex and standard_conforming_strings=on in the startup
packet instead of tracking ParameterStatus values nobody read, so the
legacy bytea escape decoder goes away. A PostgreSQL connection now
refuses a new command while a row stream is still open, and the pool
discards such a connection. Drop unused SQLite declarations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-02 10:13:09 +00:00
1 parent 49fa8c5214
commit 8d9b04c713
7 files changed
+51 -51

No files matched your search

@@ -260,6 +260,17 @@ public sealed class PgWireTests(TestContext context) : DatabaseTest(context)
Assert.Equal("x", second.GetString("b"));
}
[Test]
public async Task ACommandCannotStartWhileARowStreamIsOpen()
{
await using var session = await (await OpenAsync()).OpenAsync(Ct);
var rows = session.QueryAsync("SELECT generate_series(1, 1000)", [], Ct).GetAsyncEnumerator(Ct);
Assert.True(await rows.MoveNextAsync());
await Assert.ThrowsAsync<InvalidOperationException>(() => session.ExecuteAsync("SELECT 1", [], Ct));
await rows.DisposeAsync();
Assert.Equal(1, await session.ScalarAsync<int>("SELECT 1", [], Ct));
}
[Test]
public async Task NoticesAndScriptsDoNotDisturbTheSession()
{