# Each public table with its exact row count, one per line, in a collation-independent
# order, so the two servers' answers compare byte for byte.
PG_TABLE_COUNTS="SELECT c.relname || ' ' || (xpath('/row/n/text()', query_to_xml(format('SELECT count(*) AS n FROM public.%I', c.relname), false, true, '')))[1]::text FROM pg_class c JOIN pg_namespace s ON s.oid = c.relnamespace WHERE s.nspname = 'public' AND c.relkind IN ('r', 'p') ORDER BY 1 COLLATE \"C\""
# Each public table with its exact row count, one per line, in byte order of the table names
# whatever the servers' collations (relname is a name, which sorts in collation "C" since
# PostgreSQL 12), so the two servers' answers compare byte for byte. internal/pgint runs it
# on the oldest and newest server the installer meets; the shell tests stub psql.
PG_TABLE_COUNTS="SELECT c.relname || ' ' || (xpath('/row/n/text()', query_to_xml(format('SELECT count(*) AS n FROM public.%I', c.relname), false, true, '')))[1]::text FROM pg_class c JOIN pg_namespace s ON s.oid = c.relnamespace WHERE s.nspname = 'public' AND c.relkind IN ('r', 'p') ORDER BY c.relname"