2002-10-19 02:41:22 +08:00
|
|
|
-- Adjust this setting to control where the objects get created.
|
|
|
|
SET search_path = public;
|
|
|
|
|
2002-08-30 01:14:33 +08:00
|
|
|
CREATE TYPE pgstattuple_type AS (
|
2002-10-19 02:41:22 +08:00
|
|
|
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 %
|
2002-08-30 01:14:33 +08:00
|
|
|
);
|
2002-08-23 16:19:49 +08:00
|
|
|
|
2002-10-19 02:41:22 +08:00
|
|
|
CREATE OR REPLACE FUNCTION pgstattuple(text)
|
|
|
|
RETURNS pgstattuple_type
|
|
|
|
AS 'MODULE_PATHNAME', 'pgstattuple'
|
2003-06-12 16:02:57 +08:00
|
|
|
LANGUAGE 'C' STRICT;
|
|
|
|
|
|
|
|
CREATE OR REPLACE FUNCTION pgstattuple(oid)
|
|
|
|
RETURNS pgstattuple_type
|
|
|
|
AS 'MODULE_PATHNAME', 'pgstattuplebyid'
|
|
|
|
LANGUAGE 'C' STRICT;
|