Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rHQdr-002P0y-Jv for pgsql-general@arkaria.postgresql.org; Sun, 24 Dec 2023 15:43:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rHQdp-00Bo6x-EX for pgsql-general@arkaria.postgresql.org; Sun, 24 Dec 2023 15:43:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rHQdp-00Bo6o-3k for pgsql-general@lists.postgresql.org; Sun, 24 Dec 2023 15:43:49 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rHQdi-00BzYl-Ew for pgsql-general@postgresql.org; Sun, 24 Dec 2023 15:43:47 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3BOFhZI91611875; Sun, 24 Dec 2023 10:43:35 -0500 From: Tom Lane To: Dennis cc: pgsql-general@postgresql.org Subject: Re: Version 16.x search_path behavior change? In-reply-to: References: Comments: In-reply-to Dennis message dated "Sat, 23 Dec 2023 15:52:45 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1611873.1703432615.1@sss.pgh.pa.us> Date: Sun, 24 Dec 2023 10:43:35 -0500 Message-ID: <1611874.1703432615@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dennis writes: > The 16.x documentation still says the following: > However, you can explicitly place |pg_catalog| at the end of your search > path if you prefer to have user-defined names override built-in names. It does work that way, for ordinary names. JSON_OBJECT is special because it has special calling syntax (thank you, SQL committee) and the grammar productions for that always resolve it as the built-in function. You could override things by writing explicitly "myschema.json_object(...)" but I imagine you don't want to. I'm not sure if this should be considered a bug or not. It looks like we've gone out of our way to avoid capturing some other comparable cases such as OVERLAY and SUBSTRING, if they aren't actually written with special syntax. Don't know offhand if it's practical to handle JSON_OBJECT similarly, or whether it'd really make sense to have an exception for that. regards, tom lane