Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit fe59e56

Browse files
committed
Add Pgadmin administration functions to /contrib/adminpack.
Dave Page
1 parent 38c7700 commit fe59e56

File tree

5 files changed

+497
-3
lines changed

5 files changed

+497
-3
lines changed

contrib/README

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ adddepend -
2828
Add object dependency information to pre-7.3 objects.
2929
by Rod Taylor <rbt@rbt.ca>
3030

31-
btree_gist -
32-
Support for emulating BTREE indexing in GiST
33-
by Oleg Bartunov <oleg@sai.msu.su> and Teodor Sigaev <teodor@sigaev.ru>
31+
adminpack -
32+
File and log manipulation routines, used by Pgadmin
33+
by From: Dave Page <dpage@vale-housing.co.uk>
34+
3435

3536
chkpass -
3637
An auto-encrypted password datatype

contrib/adminpack/Makefile

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
MODULE_big = adminpack
2+
PG_CPPFLAGS = -I$(libpq_srcdir)
3+
DATA_built = adminpack.sql
4+
DOCS = README.adminpack
5+
OBJS = adminpack.o
6+
7+
ifdef USE_PGXS
8+
PGXS := $(shell pg_config --pgxs)
9+
include $(PGXS)
10+
else
11+
subdir = contrib/adminpack
12+
top_builddir = ../..
13+
include $(top_builddir)/src/Makefile.global
14+
include $(top_srcdir)/contrib/contrib-global.mk
15+
endif

contrib/adminpack/README.adminpack

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
PostgreSQL Administration Functions
2+
===================================
3+
4+
This directory is a PostgreSQL 'contrib' module which implements a number of
5+
support functions which pgAdmin and other administration and management tools
6+
can use to provide additional functionality if installed on a server.
7+
8+
Installation
9+
============
10+
11+
This module is normally distributed as a PostgreSQL 'contrib' module. To
12+
install it from a pre-configured source tree run the following commands
13+
as a user with appropriate privileges from the adminpack source directory:
14+
15+
make
16+
make install
17+
18+
Alternatively, if you have a PostgreSQL 8.2 or higher installation but no
19+
source tree you can install using PGXS. Simply run the following commands the
20+
adminpack source directory:
21+
22+
make USE_PGXS=1
23+
make USE_PGXS=1 install
24+
25+
pgAdmin will look for the functions in the Maintenance Database (usually
26+
"postgres" for 8.2 servers) specified in the connection dialogue for the server.
27+
To install the functions in the database, either run the adminpack.sql script
28+
using the pgAdmin SQL tool (and then close and reopen the connection to the
29+
freshly instrumented server), or run the script using psql, eg:
30+
31+
psql -U postgres postgres < adminpack.sql
32+
33+
Other administration tools that use this module may have different requirements,
34+
please consult the tool's documentation for further details.
35+
36+
Objects implemented (superuser only)
37+
====================================
38+
39+
int8 pg_catalog.pg_file_write(fname text, data text, append bool)
40+
int8 pg_catalog.pg_file_read(fname text, data text, append bool)
41+
bool pg_catalog.pg_file_rename(oldname text, newname text)
42+
bool pg_catalog.pg_file_rename(oldname text, newname text, archivname text)
43+
bool pg_catalog.pg_file_unlink(fname text)
44+
bigint pg_catalog.pg_file_size(text)
45+
int4 pg_catalog.pg_logfile_rotate()
46+
setof record pg_catalog.pg_logdir_ls()
47+

0 commit comments

Comments
 (0)