| From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
| Subject: | Re: Fix unqualified catalog references in psql describe queries |
| Date: | 2026-06-10 06:16:36 |
| Message-ID: | aikBRL/Tws2vmIjI@bdtpg |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Tue, Jun 09, 2026 at 10:12:48PM -0400, Tom Lane wrote:
> Michael Paquier <michael(at)paquier(dot)xyz> writes:
> > On Tue, Jun 09, 2026 at 09:08:50AM +0000, Bertrand Drouvot wrote:
> >> Now I wonder if we shoud not "protect" the operators too. They could also
> >> lead to wrong results (if not worst).
>
> > Kind of true. Still we have been pretty lax about the operators as
> > they also lead to less readable queries.
>
> We disclaimed security against odd search_paths for these queries long ago,
> precisely because wrapping every operator in PG_OPERATOR(pg_catalog.*)
> would be far too tedious and destructive of readability --- not to
> mention that there are some syntaxes such as IN that don't even offer
> the option to do that.
I do agree that doing so would "destroy" the readability. I did not look in detail,
but what about forcing ALWAYS_SECURE_SEARCH_PATH_SQL before the queries and
restore the search_path once the query is done? (that way that would not impact
the readability)
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Kyotaro Horiguchi | 2026-06-10 06:14:00 | Re: [PATCH] Release replication slot on error in SQL-callable slot functions |