@@ -1009,7 +1009,8 @@ where
10091009 let arg_types: Vec < _ > = types
10101010 . into_iter ( )
10111011 . map ( |ty| match ty {
1012- CoercibleScalarType :: Coerced ( ty) => ecx. humanize_scalar_type ( & ty) ,
1012+ // This will be used in error msgs, therefore we call with `postgres_compat` false.
1013+ CoercibleScalarType :: Coerced ( ty) => ecx. humanize_scalar_type ( & ty, false ) ,
10131014 CoercibleScalarType :: Record ( _) => "record" . to_string ( ) ,
10141015 CoercibleScalarType :: Uncoerced => "unknown" . to_string ( ) ,
10151016 } )
@@ -1809,7 +1810,8 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
18091810 let elem_type = match elem_type. array_of_self_elem_type( ) {
18101811 Ok ( elem_type) => elem_type,
18111812 Err ( elem_type) => bail_unsupported!(
1812- format!( "array_fill on {}" , ecx. humanize_scalar_type( & elem_type) )
1813+ // This will be used in error msgs, therefore we call with `postgres_compat` false.
1814+ format!( "array_fill on {}" , ecx. humanize_scalar_type( & elem_type, false ) )
18131815 ) ,
18141816 } ;
18151817
@@ -1825,7 +1827,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
18251827 let elem_type = match elem_type. array_of_self_elem_type( ) {
18261828 Ok ( elem_type) => elem_type,
18271829 Err ( elem_type) => bail_unsupported!(
1828- format!( "array_fill on {}" , ecx. humanize_scalar_type( & elem_type) )
1830+ format!( "array_fill on {}" , ecx. humanize_scalar_type( & elem_type, false ) )
18291831 ) ,
18301832 } ;
18311833
@@ -2520,7 +2522,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
25202522 let name = match ecx. scalar_type( & exprs[ 0 ] ) {
25212523 CoercibleScalarType :: Uncoerced => "unknown" . to_string( ) ,
25222524 CoercibleScalarType :: Record ( _) => "record" . to_string( ) ,
2523- CoercibleScalarType :: Coerced ( ty) => ecx. humanize_scalar_type( & ty) ,
2525+ CoercibleScalarType :: Coerced ( ty) => ecx. humanize_scalar_type( & ty, true ) ,
25242526 } ;
25252527
25262528 // For consistency with other functions, verify that
@@ -3023,7 +3025,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
30233025 let elem_type = match elem_type. array_of_self_elem_type( ) {
30243026 Ok ( elem_type) => elem_type,
30253027 Err ( elem_type) => bail_unsupported!(
3026- format!( "array_agg on {}" , ecx. humanize_scalar_type( & elem_type) )
3028+ format!( "array_agg on {}" , ecx. humanize_scalar_type( & elem_type, false ) )
30273029 ) ,
30283030 } ;
30293031
@@ -3759,7 +3761,7 @@ pub static MZ_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
37593761 let err = || {
37603762 Err ( sql_err!(
37613763 "function map_build({}) does not exist" ,
3762- ecx. humanize_scalar_type( & ty. clone( ) )
3764+ ecx. humanize_scalar_type( & ty. clone( ) , false )
37633765 ) )
37643766 } ;
37653767
0 commit comments