diff --git a/src/test/regress/expected/opr_sanity.out b/src/test/regress/expected/opr_sanity.out index 84436309ea..24a2e8a8e6 100644 --- a/src/test/regress/expected/opr_sanity.out +++ b/src/test/regress/expected/opr_sanity.out @@ -275,6 +275,55 @@ WHERE p1.prorettype = 'internal'::regtype AND NOT 2304 | internal_in (1 row) +-- Check for length inconsistencies between the various argument-info arrays. +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proallargtypes IS NOT NULL AND + array_length(proallargtypes,1) < array_length(proargtypes,1); + oid | proname +-----+--------- +(0 rows) + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proargmodes IS NOT NULL AND + array_length(proargmodes,1) < array_length(proargtypes,1); + oid | proname +-----+--------- +(0 rows) + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proargnames IS NOT NULL AND + array_length(proargnames,1) < array_length(proargtypes,1); + oid | proname +-----+--------- +(0 rows) + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proallargtypes IS NOT NULL AND proargmodes IS NOT NULL AND + array_length(proallargtypes,1) <> array_length(proargmodes,1); + oid | proname +-----+--------- +(0 rows) + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proallargtypes IS NOT NULL AND proargnames IS NOT NULL AND + array_length(proallargtypes,1) <> array_length(proargnames,1); + oid | proname +-----+--------- +(0 rows) + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proargmodes IS NOT NULL AND proargnames IS NOT NULL AND + array_length(proargmodes,1) <> array_length(proargnames,1); + oid | proname +-----+--------- +(0 rows) + -- **************** pg_cast **************** -- Catch bogus values in pg_cast columns (other than cases detected by -- oidjoins test). diff --git a/src/test/regress/sql/opr_sanity.sql b/src/test/regress/sql/opr_sanity.sql index 66958c06af..38866c9a54 100644 --- a/src/test/regress/sql/opr_sanity.sql +++ b/src/test/regress/sql/opr_sanity.sql @@ -218,6 +218,38 @@ FROM pg_proc as p1 WHERE p1.prorettype = 'internal'::regtype AND NOT 'internal'::regtype = ANY (p1.proargtypes); +-- Check for length inconsistencies between the various argument-info arrays. + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proallargtypes IS NOT NULL AND + array_length(proallargtypes,1) < array_length(proargtypes,1); + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proargmodes IS NOT NULL AND + array_length(proargmodes,1) < array_length(proargtypes,1); + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proargnames IS NOT NULL AND + array_length(proargnames,1) < array_length(proargtypes,1); + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proallargtypes IS NOT NULL AND proargmodes IS NOT NULL AND + array_length(proallargtypes,1) <> array_length(proargmodes,1); + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proallargtypes IS NOT NULL AND proargnames IS NOT NULL AND + array_length(proallargtypes,1) <> array_length(proargnames,1); + +SELECT p1.oid, p1.proname +FROM pg_proc as p1 +WHERE proargmodes IS NOT NULL AND proargnames IS NOT NULL AND + array_length(proargmodes,1) <> array_length(proargnames,1); + -- **************** pg_cast ****************