aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2025-05-01 16:51:59 -0700
committerNoah Misch <noah@leadboat.com>2025-05-01 16:52:03 -0700
commit16f911ced6bdc368c41865c0a2250462a69a4e66 (patch)
treee163f7c850f33caa7985699445a8123bb1a191d4
parent715241d71fa12a3864ea8c465745025030efdb90 (diff)
downloadpostgresql-16f911ced6bdc368c41865c0a2250462a69a4e66.tar.gz
postgresql-16f911ced6bdc368c41865c0a2250462a69a4e66.zip
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
-rw-r--r--doc/src/sgml/extend.sgml4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 8b8ccd9d4c0..2ad3fbfd1a9 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -1300,8 +1300,8 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</replaceabl
secure <varname>search_path</varname>; do <emphasis>not</emphasis>
trust the path provided by <command>CREATE/ALTER EXTENSION</command>
to be secure. Best practice is to temporarily
- set <varname>search_path</varname> to <literal>'pg_catalog,
- pg_temp'</literal> and insert references to the extension's
+ set <varname>search_path</varname> to <literal>pg_catalog,
+ pg_temp</literal> and insert references to the extension's
installation schema explicitly where needed. (This practice might
also be helpful for creating views.) Examples can be found in
the <filename>contrib</filename> modules in