mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Fix insufficient search-path paranoia in SQL function definitions.
Remove setting of search_path in install/uninstall scripts, since unlike other contrib modules this one does not want to let you change the installation schema.
This commit is contained in:
@ -1,6 +1,3 @@
|
|||||||
-- Adjust this setting to control where the objects get created.
|
|
||||||
SET search_path = public;
|
|
||||||
|
|
||||||
/* ***********************************************
|
/* ***********************************************
|
||||||
* Administrative functions for PostgreSQL
|
* Administrative functions for PostgreSQL
|
||||||
* *********************************************** */
|
* *********************************************** */
|
||||||
@ -19,7 +16,7 @@ LANGUAGE C VOLATILE;
|
|||||||
|
|
||||||
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text)
|
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text)
|
||||||
RETURNS bool
|
RETURNS bool
|
||||||
AS 'SELECT pg_file_rename($1, $2, NULL); '
|
AS 'SELECT pg_catalog.pg_file_rename($1, $2, NULL::pg_catalog.text);'
|
||||||
LANGUAGE SQL VOLATILE STRICT;
|
LANGUAGE SQL VOLATILE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_unlink(text)
|
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_unlink(text)
|
||||||
@ -42,11 +39,10 @@ LANGUAGE INTERNAL VOLATILE STRICT;
|
|||||||
|
|
||||||
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_length(text)
|
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_length(text)
|
||||||
RETURNS bigint
|
RETURNS bigint
|
||||||
AS 'SELECT size FROM pg_stat_file($1)'
|
AS 'SELECT size FROM pg_catalog.pg_stat_file($1)'
|
||||||
LANGUAGE SQL VOLATILE STRICT;
|
LANGUAGE SQL VOLATILE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION pg_catalog.pg_logfile_rotate()
|
CREATE OR REPLACE FUNCTION pg_catalog.pg_logfile_rotate()
|
||||||
RETURNS int4
|
RETURNS int4
|
||||||
AS 'pg_rotate_logfile'
|
AS 'pg_rotate_logfile'
|
||||||
LANGUAGE INTERNAL VOLATILE STRICT;
|
LANGUAGE INTERNAL VOLATILE STRICT;
|
||||||
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
-- Adjust this setting to control where the objects get dropped.
|
|
||||||
SET search_path = public;
|
|
||||||
|
|
||||||
DROP FUNCTION pg_catalog.pg_file_write(text, text, bool) ;
|
DROP FUNCTION pg_catalog.pg_file_write(text, text, bool) ;
|
||||||
DROP FUNCTION pg_catalog.pg_file_rename(text, text, text) ;
|
DROP FUNCTION pg_catalog.pg_file_rename(text, text, text) ;
|
||||||
DROP FUNCTION pg_catalog.pg_file_rename(text, text) ;
|
DROP FUNCTION pg_catalog.pg_file_rename(text, text) ;
|
||||||
|
Reference in New Issue
Block a user