Re: Schema-qualify the equality operator when deparsing NULLIF/IS DISTINCT FROM

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: michal(dot)dtz(at)gmail(dot)com
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Schema-qualify the equality operator when deparsing NULLIF/IS DISTINCT FROM
Date: 2026-07-07 14:27:24
Message-ID: 1842034.1783434444@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

michal(dot)dtz(at)gmail(dot)com writes:
> Attached is v2, which takes the opposite approach: instead of teaching
> the deparser to avoid the constructs, it gives every construct that
> resolves an operator by unqualified name a place to write a
> schema-qualified one. That covers the full list you cataloged back in
> 2018 (10492(dot)1531515255(at)sss(dot)pgh(dot)pa(dot)us) -- IS [NOT] DISTINCT FROM,
> NULLIF, simple CASE, row comparisons, ANY/ALL subquery comparisons --
> plus JOIN USING / NATURAL JOIN, which has the same disease.

I didn't read the patch yet, but this sounds promising.

> If the direction looks right I will register this in the next
> commitfest (PG 20-1).

Next one is already 20-2, but please do register it.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Chao Li 2026-07-07 14:22:45 Re: postgres_fdw: fix cumulative stats after imported foreign-table stats