summaryrefslogtreecommitdiff
path: root/contrib/pgstattuple
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-10-18 18:41:22 +0000
committerBruce Momjian <bruce@momjian.us>2002-10-18 18:41:22 +0000
commitaa4c702eac936964649f905741b4a99f4b489200 (patch)
tree517d3c28aa3d28eb95b19c8676c940b5cefe2031 /contrib/pgstattuple
parentfb9bc342fffc157d6ca4b635aeeaccb3c1370b91 (diff)
downloadpostgresql-aa4c702eac936964649f905741b4a99f4b489200.tar.gz
Update /contrib for "autocommit TO 'on'".
Create objects in public schema. Make spacing/capitalization consistent. Remove transaction block use for object creation. Remove unneeded function GRANTs.
Diffstat (limited to 'contrib/pgstattuple')
-rw-r--r--contrib/pgstattuple/pgstattuple.sql.in31
1 files changed, 18 insertions, 13 deletions
diff --git a/contrib/pgstattuple/pgstattuple.sql.in b/contrib/pgstattuple/pgstattuple.sql.in
index 7ac7b6c11c..5489c93812 100644
--- a/contrib/pgstattuple/pgstattuple.sql.in
+++ b/contrib/pgstattuple/pgstattuple.sql.in
@@ -1,17 +1,22 @@
+-- Adjust this setting to control where the objects get created.
+SET search_path = public;
+
+SET autocommit TO 'on';
+
DROP TYPE pgstattuple_type CASCADE;
CREATE TYPE pgstattuple_type AS (
- table_len BIGINT, -- physical table length in bytes
- tuple_count BIGINT, -- number of live tuples
- tuple_len BIGINT, -- total tuples length in bytes
- tuple_percent FLOAT, -- live tuples in %
- dead_tuple_count BIGINT, -- number of dead tuples
- dead_tuple_len BIGINT, -- total dead tuples length in bytes
- dead_tuple_percent FLOAT, -- dead tuples in %
- free_space BIGINT, -- free space in bytes
- free_percent FLOAT -- free space in %
+ table_len BIGINT, -- physical table length in bytes
+ tuple_count BIGINT, -- number of live tuples
+ tuple_len BIGINT, -- total tuples length in bytes
+ tuple_percent FLOAT, -- live tuples in %
+ dead_tuple_count BIGINT, -- number of dead tuples
+ dead_tuple_len BIGINT, -- total dead tuples length in bytes
+ dead_tuple_percent FLOAT, -- dead tuples in %
+ free_space BIGINT, -- free space in bytes
+ free_percent FLOAT -- free space in %
);
-CREATE OR REPLACE FUNCTION pgstattuple(text) RETURNS pgstattuple_type
- AS 'MODULE_PATHNAME', 'pgstattuple'
- LANGUAGE 'c' WITH (isstrict);
-GRANT EXECUTE ON FUNCTION pgstattuple(text) TO PUBLIC;
+CREATE OR REPLACE FUNCTION pgstattuple(text)
+RETURNS pgstattuple_type
+AS 'MODULE_PATHNAME', 'pgstattuple'
+LANGUAGE 'C' WITH (isstrict);