chatdesk-ui/postgres_15.8.1.044/tests/pg_upgrade/tests/02-data.sql

28 lines
553 B
PL/PgSQL

CREATE EXTENSION IF NOT EXISTS pgtap;
BEGIN;
SELECT plan(4);
SELECT results_eq(
'SELECT count(*)::int FROM public.countries',
ARRAY[ 249 ]
);
SELECT results_eq(
'SELECT count(*)::int FROM public.countries where continent = ''Europe''',
ARRAY[ 45 ]
);
SELECT results_eq(
'SELECT count(*)::int FROM public.european_countries',
ARRAY[ 45 ]
);
SELECT results_eq(
'SELECT count(*) FROM public.countries where continent = ''Europe''',
'SELECT count(*) FROM public.european_countries'
);
SELECT * FROM finish();
ROLLBACK;