Message-ID: From: "sehrope (@sehrope)" To: "pgjdbc/pgjdbc" Date: Wed, 07 Jan 2026 16:20:05 +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: sehrope X-GitHub-Comment-Id: 3719658388 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-3719658388 Content-Type: text/plain; charset=utf-8 @davecramer I think we should leave this alone as there's no way to have a single string parameter handle both funky names _and_ lists of funky names without some kind of oddball / breaking behavior: ```sql => CREATE SCHEMA "bad,name"; CREATE SCHEMA => CREATE TABLE "bad,name"."postgres allows crazy things like this" (id int); CREATE TABLE => \d "bad,name"."postgres allows crazy things like this" Table "bad,name.postgres allows crazy things like this" Column | Type | Collation | Nullable | Default --------+---------+-----------+----------+--------- id | integer | | | => CREATE SCHEMA "even worse "" schema name with embedded double quote"; CREATE SCHEMA ``` The "split via commas with optional spaces" will not work. I think we should leave that stuff alone. Ditto for having the `getSchema()` method not change as it'd be breaking existing behavior too. Anybody that wants the full value can run `SHOW search_path`. @cgm-aw If you want to set the search path to multiple values via JDBC properties, you can use `options` with a `-c foo,bar,baz` value to set multiple schemas in the search path. There's an example of that in the docs: https://jdbc.postgresql.org/documentation/use/#connection-parameters