Re: Version 16.x search_path behavior change?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dennis <dennis(at)iletsel(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Version 16.x search_path behavior change?
Date: 2023-12-24 15:43:35
Message-ID: 1611874.1703432615@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dennis <dennis(at)iletsel(dot)nl> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Johnathan Tiamoh 2023-12-24 16:03:24 Re: Unable to start postgresql-14
Previous Message Michael Paquier 2023-12-24 01:36:56 Re: Logical replication breaks: "unexpected duplicate for tablespace 0, relfilenode 2774069304"