postgresql/contrib/pgstattuple/pgstattuple.sql.in
Tom Lane e4186762ff Adjust nodeFunctionscan.c to reset transient memory context between calls
to the table function, thus preventing memory leakage accumulation across
calls.  This means that SRFs need to be careful to distinguish permanent
and local storage; adjust code and documentation accordingly.  Patch by
Joe Conway, very minor tweaks by Tom Lane.
2002-08-29 17:14:33 +00:00

17 lines
679 B
MySQL

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 %
);
CREATE OR REPLACE FUNCTION pgstattuple(text) RETURNS pgstattuple_type
AS 'MODULE_PATHNAME', 'pgstattuple'
LANGUAGE 'c' WITH (isstrict);