pg.ddx.io  GitHub: pgjdbc/pgjdbc (issues + PRs as email threads)  
help / color / mirror / Atom feed
From: vlsi (@vlsi) <noreply+vlsi@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: Re: [pgjdbc/pgjdbc] PR #4332: fix: limit FINEST Bind, Parse and SimpleQuery log messages to maxLogMessageLength to avoid OOM
Date: Wed, 14 Oct 2026 06:22:27 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4332-rc4267444389@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-4332@github.com>
References: <gh-pgjdbc-pgjdbc-4332@github.com>

(on pgjdbc/src/main/java/org/postgresql/util/internal/LogMessageUtils.java)

This check looks only at the neighboring characters, so in a run of quotes it moves a cut that falls between two pairs into the middle of one: `appendQuotedStringPrefix(new StringBuilder(), "''''", null, true, 7)` gives `(''...` instead of `('''...`. A doubled backslash under `standard_conforming_strings=off` is not checked at all. Please record where each escaped character starts while escaping, and cut only there. The `type` parameter is never used (`typeNameForCast` also returns `varchar` and `text`, casts `quoteAndCast` does not write), and lines 138-143 are an `if` with an empty body; please remove both. No test calls this method directly.

view thread (58+ messages)  latest in thread

Message-ID: <gh-pgjdbc-pgjdbc-4332-rc4267444389@github.com>
Permalink:  ../gh-pgjdbc-pgjdbc-4332-rc4267444389@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox