Message-ID: From: "lukaseder (@lukaseder)" To: "pgjdbc/pgjdbc" Date: Thu, 14 May 2026 20:19:40 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3062: feat: type cache rework, codec API, and composite-type round-trip In-Reply-To: References: List-Id: X-GitHub-Author-Login: lukaseder X-GitHub-Comment-Id: 4454404674 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3062 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3062#issuecomment-4454404674 Content-Type: text/plain; charset=utf-8 > Do you mean you generate and parse **binary** encodings for composites/arrays as well? > > I'm quite sure binary should be significantly faster as it would avoid 2^N (?) quoting degradation when sending nested structs that include text fields with quotes. Well. Not being force to quote contents should be a noticeable win on its own I've noticed the terrible performance characteristics of the text encoding: https://www.postgresql.org/message-id/19063-c1ba39b11b9d43b7%40postgresql.org Though it doesn't matter all that much in realistic scenarios. The quoting is annoying but manageable in a library. How does one access binary encodings? E.g. `SELECT row(1, 2)::udt` will produce the text encoding. How would I tell PostgreSQL to prefer a binary encoding, instead? > Will add as a TODO. It is indeed sad to have `SQLOutput.writeStruct(Struct)` without being able to instantiate one. I've not used that method yet. Nested structs can be written as `SQLOutput.writeObject(SQLData)`. The problem I've had is when you need to write arrays > > it'll take quite some time until all edge cases are handled correctly > > Right you are. I wonder if you could try pgjdbc with jOOQ tests to see if there's a regression. I could try, though I guess it'll be a bit of work. To do so, I'll just build your branch from github?