Message-ID: From: "NKame (@NKame)" To: "pgjdbc/pgjdbc" Date: Thu, 07 Nov 2024 11:34:21 +0000 Subject: [pgjdbc/pgjdbc] issue #3432: Don't send extra_float_digits for PostgreSQL 12+ by default List-Id: X-GitHub-Author-Id: 1572051 X-GitHub-Author-Login: NKame X-GitHub-Issue: 3432 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: closed X-GitHub-Type: issue X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3432 Content-Type: text/plain; charset=utf-8 **Describe the issue** Connecting through PgBouncer with a default configuration fails. **Driver Version?** All supported. **Java Version?** All supported. **OS Version?** All supported. **PostgreSQL Version?** >= 12 **To Reproduce** Connect throught PgBouncer. Fails with unsupported extra_float_digits parameter. **Expected behaviour** Connected to the database. **Context** extra_float_digits has been introduced in PostgreSQL 8.4 to play around the apparent precision of the lossy datatype "float". At first to increase the precision sent to the client, then since version 12, to reduce it. In pgJDBC, if you want the "full" precision with a server 12+, you must override this parameter since it is forced in the driver to the value 3 if the server is 9+, that means you have to send it twice to the server. Furthermore, by default it's not authorized by default with PgBouncer: "the internet" answer is to change the server, whereas it doesn't make really sense to send it at all for PostgreSQL 12+. (And the question of forcing a default for the lossy datatype should be asked... in my view it should be an explicit choice from the application owner).