Message-ID: From: "dkozlov-de (@dkozlov-de)" To: "pgjdbc/pgjdbc" Date: Tue, 10 Mar 2026 13:34:18 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3926: ResultSetMetaData.getColumnClassName is broken for jsonb In-Reply-To: References: List-Id: X-GitHub-Author-Login: dkozlov-de X-GitHub-Comment-Id: 4031426281 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2026-03-10T13:36:57Z X-GitHub-Issue: 3926 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3926#issuecomment-4031426281 Content-Type: text/plain; charset=utf-8 I would like to clarify my point first. I do not have any problems with treating JSONB column data as a String. It is your call and I respect it. The problem is with resultset still returning PGobject. We use org.apache.commons.beanutils.RowSetDynaClass and related classes to dynamically retrieve typed data from a resultset. This library uses column metadata to figure out what the type of a column is. Then when we ask for the column data, it tries to cast the data in resultset to the type provided by the metadata. At this point it fails because metadata says it is a String, but what the resultset returns is still PGobject. My point is that if you change the type reported by metadata to String, you should be consistent and change the real type the resultset returns to String as well. Otherwise, the metadata column class information is wrong/misleading and prevents from proper data evaluation.