/usr/share/postgresql/10/extension/pgtap--0.90.0--0.91.0.sql is in postgresql-10-pgtap 0.97.0-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | CREATE OR REPLACE FUNCTION pgtap_version()
RETURNS NUMERIC AS 'SELECT 0.91;'
LANGUAGE SQL IMMUTABLE;
CREATE OR REPLACE FUNCTION has_tablespace( NAME, TEXT, TEXT )
RETURNS TEXT AS $$
BEGIN
IF pg_version_num() >= 90200 THEN
RETURN ok(
EXISTS(
SELECT true
FROM pg_catalog.pg_tablespace
WHERE spcname = $1
AND pg_tablespace_location(oid) = $2
), $3
);
ELSE
RETURN ok(
EXISTS(
SELECT true
FROM pg_catalog.pg_tablespace
WHERE spcname = $1
AND spclocation = $2
), $3
);
END IF;
END;
$$ LANGUAGE plpgsql;
|