Doc: stop implying recommendation of insecure search_path value.
authorNoah Misch <noah@leadboat.com>
Thu, 1 May 2025 23:51:59 +0000 (16:51 -0700)
committerNoah Misch <noah@leadboat.com>
Thu, 1 May 2025 23:52:02 +0000 (16:52 -0700)
commit334e508e17da7067d11fca3053b976d7d6f3fb10
treebef9fb45354cc6866d3b50e014416182b6d25c90
parente14df1015e2ce6b9997e3b6b6ad04e8043cd0811
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
doc/src/sgml/extend.sgml