-- -- TEST_SETUP --- prepare environment expected by regression test scripts --
-- directory paths and dlsuffix are passed to us in environment variables
\getenv abs_srcdir PG_ABS_SRCDIR
\getenv libdir PG_LIBDIR
\getenv dlsuffix PG_DLSUFFIX
\set regresslib :libdir '/regress' :dlsuffix
-- -- synchronous_commit=off delays when hint bits may be set. Some plans change -- depending on the number of all-visible pages, which in turn can be -- influenced by the delayed hint bits. Force synchronous_commit=on to avoid -- that source of variability. -- SET synchronous_commit = on;
-- -- Postgres formerly made the public schema read/write by default, -- and most of the core regression tests still expect that. -- GRANTALLONSCHEMA public TO public;
-- Create a tablespace we can use in tests. SET allow_in_place_tablespaces = true; CREATE TABLESPACE regress_tblspace LOCATION '';
-- -- These tables have traditionally been referenced by many tests, -- so create and populate them. Insert only non-error values here. -- (Some subsequent tests try to insert erroneous values. That's okay -- because the table won't actually change. Do not change the contents -- of these tables in later tests, as it may affect other tests.) --
INSERTINTO ihighway SELECT * FROM ONLY road WHERE name ~ 'I- .*';
VACUUM ANALYZE ihighway;
CREATETABLE shighway (
surface text
) INHERITS (road);
INSERTINTO shighway SELECT *, 'asphalt' FROM ONLY road WHERE name ~ 'State Hwy.*';
VACUUM ANALYZE shighway;
-- -- We must have some enum type in the database for opr_sanity and type_sanity. --
create type stoplight as enum ('red', 'yellow', 'green');
-- -- Also create some non-built-in range types. --
create type float8range as range (subtype = float8, subtype_diff = float8mi);
create type textrange as range (subtype = text, collation = "C");
-- -- Create some C functions that will be used by various tests. --
CREATE FUNCTION binary_coercible(oid, oid)
RETURNS bool AS :'regresslib', 'binary_coercible'
LANGUAGE C STRICT STABLE PARALLEL SAFE;
-- Use hand-rolled hash functions and operator classes to get predictable -- result on different machines. The hash function for int4 simply returns -- the sum of the values passed to it and the one for text returns the length -- of the non-empty string value passed to it or 0.
create function part_hashint4_noop(value int4, seed int8)
returns int8as $$ select value + seed;
$$ language sql strict immutable parallel safe;
create operator class part_test_int4_ops for type int4using hash as
operator 1 =,
function 2 part_hashint4_noop(int4, int8);
create function part_hashtext_length(value text, seed int8)
returns int8as $$ select length(coalesce(value, ''))::int8
$$ language sql strict immutable parallel safe;
create operator class part_test_text_ops for type text using hash as
operator 1 =,
function 2 part_hashtext_length(text, int8);
-- -- These functions are used in tests that used to use md5(), which we now -- mostly avoid so that the tests will pass in FIPS mode. --
create function fipshash(bytea)
returns text
strict immutable parallel safe leakproof return substr(encode(sha256($1), 'hex'), 1, 32);
create function fipshash(text)
returns text
strict immutable parallel safe leakproof return substr(encode(sha256($1::bytea), 'hex'), 1, 32);
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.21 Sekunden
(vorverarbeitet am 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.