From: Dave Cramer <noreply@github.com>
To: pgsql-jdbc@lists.postgresql.org
Subject: [pgjdbc/pgjdbc] e1b843: backpatch #1949 (#2206)
Date: Mon, 05 Jul 2021 13:47:56 -0700
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/release/42.2/624d8b-e1b843@github.com> (raw)
Branch: refs/heads/release/42.2
Home: https://github.com/pgjdbc/pgjdbc
Commit: e1b8437848be9bdb13b63616fa9ee6788bfe3a34
https://github.com/pgjdbc/pgjdbc/commit/e1b8437848be9bdb13b63616fa9ee6788bfe3a34
Author: Dave Cramer <davecramer@gmail.com>
Date: 2021-07-05 (Mon, 05 Jul 2021)
Changed paths:
M pgjdbc/src/main/java/org/postgresql/core/TypeInfo.java
M pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
M pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc42/DatabaseMetaDataTest.java
Log Message:
-----------
backpatch #1949 (#2206)
Fix: Rework sql type gathering to use OID instead of typname. This does not have the issue of name shadowing / qual-names, and has the added benefit of fixing #1948.
Types that are not on the search path (e.g. they are shadowed, or in a schema that is not included in the search path) are stored in the caches as fully qualified type names and OIDs. As we cannot easily query the pg_type catalog using qualified type names, we replace the pgTypeName with the oid of the type name to query properties of the type.
Testcases are added to improve coverage of correctly detecting SQL types that are not on the path, but are available through OID or qualified lookup. These types are stored internally as a fully qualified type, but we cannot use this name for lookup in pg_type.
Special consideration has been given to Oid.UNSPECIFIED, as that needs to be mapped to Types.OTHER without first hitting the database. That mapping is static, but is not in `types` because it is not an actual type.
Fixes #1948
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: noreply@github.com
Subject: Re: [pgjdbc/pgjdbc] e1b843: backpatch #1949 (#2206)
In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/release/42.2/624d8b-e1b843@github.com>
References: <pgjdbc/pgjdbc/push/refs/heads/release/42.2/624d8b-e1b843@github.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox