Message-ID: From: "rtrier (@rtrier)" To: "pgjdbc/pgjdbc" Date: Thu, 13 Mar 2025 07:26:58 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3562: After insert with PreparedStatement into table with complex types querying leads to resultset with incorrect type In-Reply-To: References: List-Id: X-GitHub-Author-Login: rtrier X-GitHub-Comment-Id: 2720223434 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2025-03-13T07:28:53Z X-GitHub-Issue: 3562 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3562#issuecomment-2720223434 Content-Type: text/plain; charset=utf-8 **Summary** I have the table `CREATE TABLE IF NOT EXISTS xplan_gml.jdbctest` `(` ` gml_id uuid,` ` status xplan_gml.bp_status` `);` and registering `pgconn.addDataType("\"xplan_gml\".\"bp_status\"", CodeList.class); ` if Inserting a record with the PreparedStatement `"INSERT INTO xplan_gml.jdbctest(gml_id, status) values(?, ?)";` before querying with `Select gml_id, status from xplan_gml.jdbctest where gml_id = ?` then the type of the status object is not an instance of the class CodeList as expected. If I run the query without an preceding insert statement the status object is an instance of CodeList.