pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Doc: stop implying recommendation of insecure search_path value.
Date: Thu, 01 May 2025 23:53:48 +0000
Message-ID: <E1uAdiu-000Xqg-1o@gemulon.postgresql.org> (raw)

Doc: stop implying recommendation of insecure search_path value.

SQL "SET search_path = 'pg_catalog, pg_temp'" is silently equivalent to
"SET search_path = pg_temp, pg_catalog, "pg_catalog, pg_temp"" instead
of the intended "SET search_path = pg_catalog, pg_temp".  (The intent
was a two-element search path.  With the single quotes, it instead
specifies one element with a comma and a space in the middle of the
element.)  In addition to the SET statement, this affects SET clauses of
CREATE FUNCTION, ALTER ROLE, and ALTER DATABASE.  It does not affect the
set_config() SQL function.

Though the documentation did not show an insecure command, remove single
quotes that could entice a reader to write an insecure command.
Back-patch to v13 (all supported versions).

Reported-by: Sven Klemm <sven@timescale.com>
Author: Sven Klemm <sven@timescale.com>
Backpatch-through: 13

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fd0af4906c1ad0c8b5aa58990b6b37c5d11cb428

Modified Files
--------------
doc/src/sgml/extend.sgml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1uAdiu-000Xqg-1o@gemulon.postgresql.org>
Permalink:  ../E1uAdiu-000Xqg-1o@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uAdiu-000Xqg-1o@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: noah@leadboat.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Doc: stop implying recommendation of insecure search_path value.
  In-Reply-To: <E1uAdiu-000Xqg-1o@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox