1 /* contrib/adminpack/adminpack--1.1--2.0.sql */
3 -- complain if script is sourced in psql, rather than via ALTER EXTENSION
4 \echo Use "ALTER EXTENSION adminpack UPDATE TO '2.0'" to load this file. \quit
6 /* ***********************************************
7 * Administrative functions for PostgreSQL
8 * *********************************************** */
10 /* generic file access functions */
12 CREATE OR REPLACE FUNCTION pg_catalog.pg_file_write(text, text, bool)
14 AS 'MODULE_PATHNAME', 'pg_file_write_v1_1'
15 LANGUAGE C VOLATILE STRICT;
17 REVOKE EXECUTE ON FUNCTION pg_catalog.pg_file_write(text, text, bool) FROM PUBLIC;
19 CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text, text)
21 AS 'MODULE_PATHNAME', 'pg_file_rename_v1_1'
24 REVOKE EXECUTE ON FUNCTION pg_catalog.pg_file_rename(text, text, text) FROM PUBLIC;
26 CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text)
28 AS 'SELECT pg_catalog.pg_file_rename($1, $2, NULL::pg_catalog.text);'
29 LANGUAGE SQL VOLATILE STRICT;
31 CREATE OR REPLACE FUNCTION pg_catalog.pg_file_unlink(text)
33 AS 'MODULE_PATHNAME', 'pg_file_unlink_v1_1'
34 LANGUAGE C VOLATILE STRICT;
36 REVOKE EXECUTE ON FUNCTION pg_catalog.pg_file_unlink(text) FROM PUBLIC;
38 CREATE OR REPLACE FUNCTION pg_catalog.pg_logdir_ls()
40 AS 'MODULE_PATHNAME', 'pg_logdir_ls_v1_1'
41 LANGUAGE C VOLATILE STRICT;
43 REVOKE EXECUTE ON FUNCTION pg_catalog.pg_logdir_ls() FROM PUBLIC;
45 /* These functions are now in the backend and callers should update to use those */
47 DROP FUNCTION pg_file_read(text, bigint, bigint);
49 DROP FUNCTION pg_file_length(text);
51 DROP FUNCTION pg_logfile_rotate();