From 7d087c68d9dea2c5ab44900205cdacdfe279158c Mon Sep 17 00:00:00 2001 From: Laurenz Albe Date: Wed, 13 Jul 2016 09:35:31 +0200 Subject: [PATCH] Fix mention of pg_temp in CREATE FUNCTION documentation Commit aa27977 removed searching of the temporary-table schema for functions and operators, but the documentation still stated that pg_temp is searched. --- doc/src/sgml/ref/create_function.sgml | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/src/sgml/ref/create_function.sgml b/doc/src/sgml/ref/create_function.sgml index 097e2bd..7ee4acb 100644 --- a/doc/src/sgml/ref/create_function.sgml +++ b/doc/src/sgml/ref/create_function.sgml @@ -751,11 +751,9 @@ SELECT * FROM dup(42); should be set to exclude any schemas writable by untrusted users. This prevents malicious users from creating objects that mask objects used by the - function. Particularly important in this regard is the - temporary-table schema, which is searched first by default, and - is normally writable by anyone. A secure arrangement can be obtained - by forcing the temporary schema to be searched last. To do this, - write pg_temppg_tempsecuring functions as the last entry in search_path. + function. + Note that for security reasons, the temporary-table schema + pg_temp is never searched for functions. This function illustrates safe usage: @@ -772,8 +770,8 @@ BEGIN END; $$ LANGUAGE plpgsql SECURITY DEFINER - -- Set a secure search_path: trusted schema(s), then 'pg_temp'. - SET search_path = admin, pg_temp; + -- Set a secure search_path with only trusted schema(s). + SET search_path = admin; -- 1.7.1