--- /dev/null
+/* contrib/pgstattuple/pgstattuple--1.3--1.4.sql */
+
+-- complain if script is sourced in psql, rather than via ALTER EXTENSION
+\echo Use "ALTER EXTENSION pgstattuple UPDATE TO '1.4'" to load this file. \quit
+
+ALTER FUNCTION pgstattuple(text) PARALLEL SAFE;
+ALTER FUNCTION pgstatindex(text) PARALLEL SAFE;
+ALTER FUNCTION pg_relpages(text) PARALLEL SAFE;
+ALTER FUNCTION pgstatginindex(regclass) PARALLEL SAFE;
+ALTER FUNCTION pgstattuple(regclass) PARALLEL SAFE;
+ALTER FUNCTION pgstatindex(regclass) PARALLEL SAFE;
+ALTER FUNCTION pg_relpages(regclass) PARALLEL SAFE;
+ALTER FUNCTION pgstattuple_approx(regclass) PARALLEL SAFE;
OUT free_space BIGINT, -- free space in bytes
OUT free_percent FLOAT8) -- free space in %
AS 'MODULE_PATHNAME', 'pgstattuple'
-LANGUAGE C STRICT;
+LANGUAGE C STRICT PARALLEL SAFE;
CREATE FUNCTION pgstatindex(IN relname text,
OUT version INT,
OUT avg_leaf_density FLOAT8,
OUT leaf_fragmentation FLOAT8)
AS 'MODULE_PATHNAME', 'pgstatindex'
-LANGUAGE C STRICT;
+LANGUAGE C STRICT PARALLEL SAFE;
CREATE FUNCTION pg_relpages(IN relname text)
RETURNS BIGINT
AS 'MODULE_PATHNAME', 'pg_relpages'
-LANGUAGE C STRICT;
+LANGUAGE C STRICT PARALLEL SAFE;
/* New stuff in 1.1 begins here */
OUT pending_pages INT4,
OUT pending_tuples BIGINT)
AS 'MODULE_PATHNAME', 'pgstatginindex'
-LANGUAGE C STRICT;
+LANGUAGE C STRICT PARALLEL SAFE;
/* New stuff in 1.2 begins here */
OUT free_space BIGINT, -- free space in bytes
OUT free_percent FLOAT8) -- free space in %
AS 'MODULE_PATHNAME', 'pgstattuplebyid'
-LANGUAGE C STRICT;
+LANGUAGE C STRICT PARALLEL SAFE;
CREATE FUNCTION pgstatindex(IN relname regclass,
OUT version INT,
OUT avg_leaf_density FLOAT8,
OUT leaf_fragmentation FLOAT8)
AS 'MODULE_PATHNAME', 'pgstatindexbyid'
-LANGUAGE C STRICT;
+LANGUAGE C STRICT PARALLEL SAFE;
CREATE FUNCTION pg_relpages(IN relname regclass)
RETURNS BIGINT
AS 'MODULE_PATHNAME', 'pg_relpagesbyid'
-LANGUAGE C STRICT;
+LANGUAGE C STRICT PARALLEL SAFE;
/* New stuff in 1.3 begins here */
OUT approx_free_space BIGINT, -- estimated free space in bytes
OUT approx_free_percent FLOAT8) -- free space in % (based on estimate)
AS 'MODULE_PATHNAME', 'pgstattuple_approx'
-LANGUAGE C STRICT;
+LANGUAGE C STRICT PARALLEL SAFE;