Message-ID: From: "cgm-aw (@cgm-aw)" To: "pgjdbc/pgjdbc" Date: Thu, 17 Apr 2025 13:16:47 +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: 2812867495 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2025-04-17T13:17:22Z X-GitHub-Issue: 3606 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3606#issuecomment-2812867495 Content-Type: text/plain; charset=utf-8 I'm happy to change it, but this would alter the behavior of the method and might break existing code. Maybe rather update the documentation, that `getSchema()` returns the results of `current_schema()`, which shows the first element on the search_path? I guess this is up to you to decide; personally, I would not change `getSchema()`. Obviously setting a list of schemas is an edge case, since I'm the first to report it. If I connect with psql and just run `show search_path` I get this: ``` postgres=# show search_path; search_path ----------------- "$user", public (1 row) postgres=# select current_schema(); current_schema ---------------- public (1 row) ``` I'm out of my depth here, but it seems like the schema `"$user"` is hidden from `current_schema()`. I never heard of this $user schema, so I cannot really explain what is going on.