mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-17 12:43:39 +02:00
17 lines
750 B
MySQL
17 lines
750 B
MySQL
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);
|