pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: hlcianfagna (@hlcianfagna) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] PR #3533: refactor: Use key_column_usage instead of indnkeyatts in PgDatabaseMetaData for faster speed and improved compatibility
Date: Thu, 20 Feb 2025 11:45:16 +0000
Message-ID: <[email protected]> (raw)

https://github.com/pgjdbc/pgjdbc/pull/3434 introduced a change to avoid mistakenly treating included columns as part of the PK, however the way this is done relies on a particular metadata field which some "PostgreSQL-compatible" database systems (e.g. CrateDB) do not populate in the same way as PostgreSQL does, this refactor addresses this by getting the same information via the standard `information_schema.key_column_usage` view, this has the added benefit of shaving a few milliseconds on the `getPrimaryKeys` call.

### All Submissions:

* [YES] Have you followed the guidelines in our [Contributing](https://github.com/pgjdbc/pgjdbc/blob/master/CONTRIBUTING.md) document?
* [YES] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?

### Changes to Existing Features:

* [NO] Does this break existing behaviour? If so please explain.
* [YES] Have you added an explanation of what your changes do and why you'd like us to include them?
* [NA] Have you written new tests for your core changes, as applicable?
* [YES] Have you successfully run tests with your changes locally?


view thread (11+ 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 #3533: refactor: Use key_column_usage instead of indnkeyatts in PgDatabaseMetaData for faster speed and improved compatibility
  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