Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Fri, 18 Jul 2025 10:06:18 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3729: PgDatabaseMetaData.getColumns returns duplicate columnNames In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 3088892598 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3729 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3729#issuecomment-3088892598 Content-Type: text/plain; charset=utf-8 pgjdbc should not escape `_` here. `java.sql.DatabaseMetaData#getColumns` intentionally uses **patterns** for the parameter names, and it refers to `java.sql.DatabaseMetaData#getSearchStringEscape`. So the resolution is that end-users should escape the pattern characters like `_` and `%` with a help of `getSearchStringEscape`. See https://www.postgrespro.com/list/thread-id/1937525