Message-ID: From: "davecramer (@davecramer)" To: "pgjdbc/pgjdbc" Date: Wed, 09 Jul 2025 11:48:54 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3723: `connection.setSchema("invalid_schema")` should throws IllegalArgumentException In-Reply-To: References: List-Id: X-GitHub-Author-Login: davecramer X-GitHub-Comment-Id: 3052336941 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3723 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3723#issuecomment-3052336941 Content-Type: text/plain; charset=utf-8 Well, postgres does not throw an error if you execute set `search_path='invalid_schema'` and subsequent calls to `current_schema()` return null as per current_schema () → name Returns the name of the schema that is first in the search path (or a null value if the search path is empty). This is the schema that will be used for any tables or other named objects that are created without specifying a target schema. See https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-INFO-SESSION