blob: 7c661a8ee3c21d5b3bfef624a137d477f9f21e46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
DROP VIEW pgstattuple_view CASCADE;
CREATE VIEW pgstattuple_view AS
SELECT
0::BIGINT AS table_len, -- physical table length in bytes
0::BIGINT AS tuple_count, -- number of live tuples
0::BIGINT AS tuple_len, -- total tuples length in bytes
0.0::FLOAT AS tuple_percent, -- live tuples in %
0::BIGINT AS dead_tuple_count, -- number of dead tuples
0::BIGINT AS dead_tuple_len, -- total dead tuples length in bytes
0.0::FLOAT AS dead_tuple_percent, -- dead tuples in %
0::BIGINT AS free_space, -- free space in bytes
0.0::FLOAT AS free_percent; -- free space in %
CREATE OR REPLACE FUNCTION pgstattuple(text) RETURNS SETOF pgstattuple_view
AS 'MODULE_PATHNAME', 'pgstattuple'
LANGUAGE 'c' WITH (isstrict);
|