Message-ID: From: "cgm-aw (@cgm-aw)" To: "pgjdbc/pgjdbc" Date: Thu, 17 Apr 2025 13:43:40 +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: 2812981222 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-2812981222 Content-Type: text/plain; charset=utf-8 > FYI If one of the list items is the special name $user, then the schema having the name returned by CURRENT_USER is substituted, if there is such a schema and the user has USAGE permission for it. (If not, $user is ignored.) Ah thanks, I didn't know that. I guess there are points to both sides - a `get` should return the state that a `set` established, but also the new `getSchema` implementation might break code for people who didn't even know they had multiple schemas on their search path. Adding the new behavior to the changelog should be enough to clarify this, though. The [Javadoc](https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/Connection.html#getSchema()) doesn't have much to say on this. Changing `getSchema` is obviously trivial, so let me know which behavior you want.