Re: psql internals queries breaks in presence of user-defined operators

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: psql internals queries breaks in presence of user-defined operators
Date: 2026-06-25 14:36:46
Message-ID: 1083856.1782398206@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kirill Reshke <reshkekirill(at)gmail(dot)com> writes:
> If a user creates a malformed operator in theirs database, like:
> ...
> then psql's meta-commands queries like \du stop working.

Yup.

> I think this can be enhanced a little by schema-qualifying psql's
> internal query.

This has been discussed and rejected before. Fully schema-qualifying
those queries would make them unreadable and close to unmaintainable.
And before you say that readability doesn't matter here: you're wrong.
Lots of people look at these queries via "psql -E" to see how to query
the catalogs.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2026-06-25 14:47:01 Re: glob support in extension_control_path/dynamic_library_path?
Previous Message Nisha Moond 2026-06-25 14:31:02 Re: Proposal: Conflict log history table for Logical Replication