Re: Fix unqualified catalog references in psql describe queries
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>,
Michael Paquier <michael@paquier.xyz>,
Chao Li <li.evan.chao@gmail.com>,
"L. pgsql-hackers" <pgsql-hackers@lists.postgresql.org>,
Fujii Masao <masao.fujii@gmail.com>,
Peter Eisentraut <peter@eisentraut.org>,
Jeff Davis <pgsql@j-davis.com>,
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>,
Amit Kapila <amit.kapila16@gmail.com>
Date: 2026-06-15T17:22:56Z
Lists: pgsql-hackers
=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre@kurilemu.de> writes: > My proposal would be that all operators, both system-defined as well as > user-defined, live in a single namespace -- not that we forbid them from > being created. Exactly how does that improve anyone's life? It will certainly not improve query security, rather the reverse. You could no longer put less-trusted stuff into a schema that's not in your search_path. Yes, it would stop people from creating operators that are exact duplicates of system operators, but those are not the problem: user-defined operators like that are already masked by the lookup rules, assuming that pg_catalog is searched first as is the normal case. The thing that is dangerous is a user-defined operator that is made to capture cases that lack an exact system-operator match (say, varchar = text). AFAICS your proposal puts those on exactly the same footing as system-defined operators, and there is no recourse. regards, tom lane
Commits
-
psql: Add some missing schema qualifications in describe.c
- bf5206f00773 19 (unreleased) landed
-
SQL Property Graph Queries (SQL/PGQ)
- 2f094e7ac691 19 (unreleased) cited
-
CREATE SUBSCRIPTION ... SERVER.
- 8185bb534763 19 (unreleased) cited