diff --git a/contrib/adminpack/adminpack.sql.in b/contrib/adminpack/adminpack.sql.in
index c2da5b11a0faadbdbed4e183223c2c4103a00ae8..9f6a915388bc5c4a5959a81376c8bbc0a851bed3 100644
--- a/contrib/adminpack/adminpack.sql.in
+++ b/contrib/adminpack/adminpack.sql.in
@@ -1,6 +1,3 @@
--- Adjust this setting to control where the objects get created.
-SET search_path = public;
-
 /* ***********************************************
  * Administrative functions for PostgreSQL
  * *********************************************** */
@@ -19,7 +16,7 @@ LANGUAGE C VOLATILE;
 
 CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text)
 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;
 
 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)
 RETURNS bigint
-AS 'SELECT size FROM pg_stat_file($1)'
+AS 'SELECT size FROM pg_catalog.pg_stat_file($1)'
 LANGUAGE SQL VOLATILE STRICT;
 
 CREATE OR REPLACE FUNCTION pg_catalog.pg_logfile_rotate()
 RETURNS int4
 AS 'pg_rotate_logfile'
 LANGUAGE INTERNAL VOLATILE STRICT;
-
diff --git a/contrib/adminpack/uninstall_adminpack.sql b/contrib/adminpack/uninstall_adminpack.sql
index 03703a0ac4b76a81ffabef54b9a95b9ef1b0eab9..b748cbbf63a42272ee7fbf64ce1fbbd9f1188924 100644
--- a/contrib/adminpack/uninstall_adminpack.sql
+++ b/contrib/adminpack/uninstall_adminpack.sql
@@ -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_rename(text, text, text) ;
 DROP FUNCTION pg_catalog.pg_file_rename(text, text) ;