@@ -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,7 @@ 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+ format!( "array_fill on {}" , ecx. humanize_scalar_type( & elem_type, false ) )
18131814 ) ,
18141815 } ;
18151816
@@ -1825,7 +1826,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
18251826 let elem_type = match elem_type. array_of_self_elem_type( ) {
18261827 Ok ( elem_type) => elem_type,
18271828 Err ( elem_type) => bail_unsupported!(
1828- format!( "array_fill on {}" , ecx. humanize_scalar_type( & elem_type) )
1829+ format!( "array_fill on {}" , ecx. humanize_scalar_type( & elem_type, false ) )
18291830 ) ,
18301831 } ;
18311832
@@ -2520,7 +2521,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
25202521 let name = match ecx. scalar_type( & exprs[ 0 ] ) {
25212522 CoercibleScalarType :: Uncoerced => "unknown" . to_string( ) ,
25222523 CoercibleScalarType :: Record ( _) => "record" . to_string( ) ,
2523- CoercibleScalarType :: Coerced ( ty) => ecx. humanize_scalar_type( & ty) ,
2524+ CoercibleScalarType :: Coerced ( ty) => ecx. humanize_scalar_type( & ty, true ) ,
25242525 } ;
25252526
25262527 // For consistency with other functions, verify that
@@ -3023,7 +3024,7 @@ pub static PG_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
30233024 let elem_type = match elem_type. array_of_self_elem_type( ) {
30243025 Ok ( elem_type) => elem_type,
30253026 Err ( elem_type) => bail_unsupported!(
3026- format!( "array_agg on {}" , ecx. humanize_scalar_type( & elem_type) )
3027+ format!( "array_agg on {}" , ecx. humanize_scalar_type( & elem_type, false ) )
30273028 ) ,
30283029 } ;
30293030
@@ -3759,7 +3760,7 @@ pub static MZ_CATALOG_BUILTINS: LazyLock<BTreeMap<&'static str, Func>> = LazyLoc
37593760 let err = || {
37603761 Err ( sql_err!(
37613762 "function map_build({}) does not exist" ,
3762- ecx. humanize_scalar_type( & ty. clone( ) )
3763+ ecx. humanize_scalar_type( & ty. clone( ) , false )
37633764 ) )
37643765 } ;
37653766
0 commit comments