Re: casting strings to multidimensional arrays yields strange results - Mailing list pgsql-bugs

From Tom Lane
Subject Re: casting strings to multidimensional arrays yields strange results
Date
Msg-id 163.1090946464@sss.pgh.pa.us
Whole thread Raw
In response to Re: casting strings to multidimensional arrays yields strange  (Kris Jurka <books@ejurka.com>)
List pgsql-bugs
Kris Jurka <books@ejurka.com> writes:
> Are you considering NULL padding arrays constructed with the
> ARRAY[] syntax?

Don't think anyone's really thought about it.

> we should consistently pad with 0 instead of sometimes padding and sometimes
> truncating.

"Pad with 0" is a meaningless concept as soon as you think about
nonnumeric data types.  I'm not very sure what's even happening
inside the code --- it's a bit surprising it doesn't crash outright
on pass-by-reference data types ...

I'd agree that the truncation behavior is wrong, but I don't want to
get rid of it by causing the padding behavior to happen more often.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Kris Jurka
Date:
Subject: Re: BUG #1201: void functions called through jdbc driver
Next
From: Tom Lane
Date:
Subject: Re: casting strings to multidimensional arrays yields strange results