mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
f85f43dfb5
only remnant of this failed experiment is that the server will take SET AUTOCOMMIT TO ON. Still TODO: provide some client-side autocommit logic in libpq.
21 lines
742 B
MySQL
21 lines
742 B
MySQL
-- Adjust this setting to control where the objects get created.
|
|
SET search_path = public;
|
|
|
|
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);
|