pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: lukaseder (@lukaseder) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] PR #3062: feat: type cache rework, codec API, and composite-type round-trip
Date: Thu, 14 May 2026 20:19:40 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

> 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?

view thread (32+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] PR #3062: feat: type cache rework, codec API, and composite-type round-trip
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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