Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite0b15e2

Browse files
committed
Fix insufficient search-path paranoia in SQL function definitions.
Remove setting of search_path in install/uninstall scripts, since unlikeother contrib modules this one does not want to let you change theinstallation schema.
1 parent14f461d commite0b15e2

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

‎contrib/adminpack/adminpack.sql.in

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
-- Adjust this setting to control where the objects get created.
2-
SET search_path = public;
3-
41
/* ***********************************************
52
* Administrative functions for PostgreSQL
63
* *********************************************** */
@@ -19,7 +16,7 @@ LANGUAGE C VOLATILE;
1916

2017
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text)
2118
RETURNS bool
22-
AS 'SELECT pg_file_rename($1, $2, NULL);'
19+
AS 'SELECTpg_catalog.pg_file_rename($1, $2, NULL::pg_catalog.text);'
2320
LANGUAGE SQL VOLATILE STRICT;
2421

2522
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_unlink(text)
@@ -42,11 +39,10 @@ LANGUAGE INTERNAL VOLATILE STRICT;
4239

4340
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_length(text)
4441
RETURNS bigint
45-
AS 'SELECT size FROM pg_stat_file($1)'
42+
AS 'SELECT size FROMpg_catalog.pg_stat_file($1)'
4643
LANGUAGE SQL VOLATILE STRICT;
4744

4845
CREATE OR REPLACE FUNCTION pg_catalog.pg_logfile_rotate()
4946
RETURNS int4
5047
AS 'pg_rotate_logfile'
5148
LANGUAGE INTERNAL VOLATILE STRICT;
52-

‎contrib/adminpack/uninstall_adminpack.sql

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
-- Adjust this setting to control where the objects get dropped.
2-
SET search_path= public;
3-
41
DROPFUNCTIONpg_catalog.pg_file_write(text,text, bool) ;
52
DROPFUNCTIONpg_catalog.pg_file_rename(text,text,text) ;
63
DROPFUNCTIONpg_catalog.pg_file_rename(text,text) ;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp