Message-ID: From: "cgm-aw (@cgm-aw)" To: "pgjdbc/pgjdbc" Date: Wed, 23 Apr 2025 09:16:26 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3606: fix: add support for multiple schemas via PgConnection.setSchema In-Reply-To: References: List-Id: X-GitHub-Author-Login: cgm-aw X-GitHub-Comment-Id: 2823622976 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3606 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3606#issuecomment-2823622976 Content-Type: text/plain; charset=utf-8 So how do we proceed? My proposal: we keep the PR as it is, `getSchema()` will not be changed. My reasoning behind this is: Currently, if I set multiple schemas for a user via `ALTER ROLE SET search_path = schema1,schema2` or via JDBC connection string and then call `getSchema()` via JDBC, I will only get one schema back. So people already expect `getSchema()` to only return one schema, even if they configured multiple. A change in `getSchema()` is unexpected and Postgres states that `current_schema()` only returns one schema. Someone who wants to see all schemas can still call `SHOW search_path`.