Debian Codegraph @

contrib/pgstattuple/pgstattuple--1.2--1.3.sql

raw
1 /* contrib/pgstattuple/pgstattuple--1.2--1.3.sql */
2
3 -- complain if script is sourced in psql, rather than via ALTER EXTENSION
4 \echo Use "ALTER EXTENSION pgstattuple UPDATE TO '1.3'" to load this file. \quit
5
6 CREATE FUNCTION pgstattuple_approx(IN reloid regclass,
7 OUT table_len BIGINT, -- physical table length in bytes
8 OUT scanned_percent FLOAT8, -- what percentage of the table's pages was scanned
9 OUT approx_tuple_count BIGINT, -- estimated number of live tuples
10 OUT approx_tuple_len BIGINT, -- estimated total length in bytes of live tuples
11 OUT approx_tuple_percent FLOAT8, -- live tuples in % (based on estimate)
12 OUT dead_tuple_count BIGINT, -- exact number of dead tuples
13 OUT dead_tuple_len BIGINT, -- exact total length in bytes of dead tuples
14 OUT dead_tuple_percent FLOAT8, -- dead tuples in % (based on estimate)
15 OUT approx_free_space BIGINT, -- estimated free space in bytes
16 OUT approx_free_percent FLOAT8) -- free space in % (based on estimate)
17 AS 'MODULE_PATHNAME', 'pgstattuple_approx'
18 LANGUAGE C STRICT;