Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Sun, 13 Apr 2025 08:49:20 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3588: refactor empty resultset to use empty result set if the catalog is not correct In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 2041077994 X-GitHub-Comment-Type: review_comment X-GitHub-Commit: 6e70fbdfe5900515c22a98631d500aaf8bae371d X-GitHub-Issue: 3588 X-GitHub-Line: 1270 X-GitHub-Path: pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: review_comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3588#discussion_r2041077994 Content-Type: text/plain; charset=utf-8 (on pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java:1270) `"" retrieves those without a catalog` I assume PostgreSQL does not have "procedures without a catalog", so `catalog.isEmpty()` check looks redundant here. WDYT of replacing this with `catalog != null && (catalog.isEmpty() || !catalog.equals(connection.getCatalog()))` `!Objects.equals(catalog, connection.getCatalog())` could do as well (at a cost of one-time SQL in `getCatalog()`)