-- expected failures on bs_date cast SELECT '2056-13-40'::bs_date; -- invalid BS date ERROR: Invalid BS date: 2056-13-40 LINE 1: SELECT '2056-13-40'::bs_date; ^ SELECT 'jpt-value'::bs_date; -- invalid string ERROR: invalid input syntax for bs_date: "jpt-value" LINE 1: SELECT 'jpt-value'::bs_date; ^ HINT: Use YYYY/MM/DD or DD/MM/YYYY. Valid separators are /, -, and . SELECT '2101/01/01'::bs_date; -- out of range BS date ERROR: Unsupported BS year 2101. Data is only available for 2000-2100 LINE 1: SELECT '2101/01/01'::bs_date; ^ SELECT 12345::bs_date; -- invalid type ERROR: cannot cast type integer to bs_date LINE 1: SELECT 12345::bs_date; ^ -- expected failures on ad_to_bs SELECT ad_to_bs('2001-13-01'); -- invalid AD date ERROR: date/time field value out of range: "2001-13-01" LINE 1: SELECT ad_to_bs('2001-13-01'); ^ HINT: Perhaps you need a different "DateStyle" setting. SELECT ad_to_bs('jpt-value'); -- invalid input string ERROR: invalid input syntax for type date: "jpt-value" LINE 1: SELECT ad_to_bs('jpt-value'); ^ SELECT ad_to_bs(12345); -- invalid argument type ERROR: function ad_to_bs(integer) does not exist LINE 1: SELECT ad_to_bs(12345); ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. SELECT ad_to_bs('2045/01/01'); -- out of range date value (not supported for BS conversion currently) ERROR: Unsupported BS year 2101. Data is only available for 2000-2100