Message-ID: From: "sehrope (@sehrope)" To: "pgjdbc/pgjdbc" Date: Wed, 02 Apr 2025 12:28:29 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #3568: use pgType instead of internal name to preserve the schema In-Reply-To: References: List-Id: X-GitHub-Author-Login: sehrope X-GitHub-Comment-Id: 2772407917 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3568 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3568#issuecomment-2772407917 Content-Type: text/plain; charset=utf-8 Does this always get called with a fully qualified name? If so that seems the correct thing to do here. Otherwise how do you deal with oddball edge cases like `public` no longer being in the search path? Note how the server respects the search path to determine how to refer to an object: ``` => SELECT 'person'::regclass::oid; oid ------- 20768 (1 row) => SELECT 20768::oid::regclass; regclass ---------- person (1 row) => SET search_path = '$user$'; SET => SELECT 20768::oid::regclass; regclass --------------- public.person (1 row) ``` Any magic to strip out the `public` bit would work the majority of the time due to the default search path, but it would be wrong once any changes to search path happen. Especially if `public` is entirely removed.