diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/misc_functions.out | 31 | ||||
| -rw-r--r-- | src/test/regress/sql/misc_functions.sql | 11 | 
2 files changed, 42 insertions, 0 deletions
diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out index 36164a99c83..e76e28b95ce 100644 --- a/src/test/regress/expected/misc_functions.out +++ b/src/test/regress/expected/misc_functions.out @@ -178,6 +178,37 @@ LINE 1: SELECT num_nulls();                 ^  DETAIL:  No function of that name accepts the given number of arguments.  -- +-- error_on_null() +-- +SELECT error_on_null(1); + error_on_null  +--------------- +             1 +(1 row) + +SELECT error_on_null(NULL::int); +ERROR:  null value not allowed +SELECT error_on_null(NULL::int[]); +ERROR:  null value not allowed +SELECT error_on_null('{1,2,NULL,3}'::int[]); + error_on_null  +--------------- + {1,2,NULL,3} +(1 row) + +SELECT error_on_null(ROW(1,NULL::int)); + error_on_null  +--------------- + (1,) +(1 row) + +SELECT error_on_null(ROW(NULL,NULL)); + error_on_null  +--------------- + (,) +(1 row) + +--  -- canonicalize_path()  --  CREATE FUNCTION test_canonicalize_path(text) diff --git a/src/test/regress/sql/misc_functions.sql b/src/test/regress/sql/misc_functions.sql index 23792c4132a..220472d5ad1 100644 --- a/src/test/regress/sql/misc_functions.sql +++ b/src/test/regress/sql/misc_functions.sql @@ -78,6 +78,17 @@ SELECT num_nonnulls();  SELECT num_nulls();  -- +-- error_on_null() +-- + +SELECT error_on_null(1); +SELECT error_on_null(NULL::int); +SELECT error_on_null(NULL::int[]); +SELECT error_on_null('{1,2,NULL,3}'::int[]); +SELECT error_on_null(ROW(1,NULL::int)); +SELECT error_on_null(ROW(NULL,NULL)); + +--  -- canonicalize_path()  --  | 
