From: Joe Conway <mail@joeconway.com>
To: Bruce Momjian <bruce@momjian.us>
To: borz_off@cs.msu.su
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8399: inconsistent input of multidimensional arrays
Date: Fri, 31 Jan 2014 17:46:29 -0800
Message-ID: <52EC51F5.1020701@joeconway.com> (raw)
In-Reply-To: <20140201011125.GG19957@momjian.us>
References: <E1VEETa-0007KM-8O@wrigleys.postgresql.org>
<20140201011125.GG19957@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/31/2014 05:11 PM, Bruce Momjian wrote:
> On Tue, Aug 27, 2013 at 08:18:10AM +0000, borz_off@cs.msu.su
> wrote:
>> PostgreSQL documentation states:
>>
>> "Multidimensional arrays must have matching extents for each
>> dimension. A mismatch causes an error..."
>>
>>
>> This is not completely true: postgres=# select cast('{{1,2},
>> {3}}' as integer[]); ERROR: multidimensional arrays must have
>> array expressions with matching dimensions LINE 1: select
>> cast('{{1,2}, {3}}' as integer[]); ^ postgres=# select
>> cast('{{1}, {2,3}}' as integer[]); int4 ------------------
>> {{1,NULL},{2,3}} (1 row)
>>
>>
>> Trying to use an array constructor yields an expected error in
>> both cases.
> Joe, does this sound right?
I believe back when that 2004 commit was made, arrays did not allow
NULL elements at all. So I guess this is an unintended side effect of,
or a latent bug exposed by, that change.
Let me take a closer look...
Joe
- --
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJS7FH1AAoJEDfy90M199hlMzUP/1e6h0UioXC7HkEgW4DLrI4v
V1lVWu3BB9rmQ6RBJMTA6/wJXm28X5etGrDAt0prQPMsvffNcSxZt5gStmMbvCDo
9+90ZrIYdjNJ8GKzojXYsPj7YDzXgkroyYIYW7fUyzjsJqDt8pfR8da5qDJeWyS8
44teI7hWd4RDRK2kBZlpr6gk/J8CSawBR9Noh5PdG1M39oeep2DcdjLbj+XNZB33
by4KiGi+Al8gLLpmyCZCVCukK92MrmOrauz9gyOto6wdcMjyb+rzdLnyAPUG5B/m
Kk+1UZhWSKKVi4DlujHOwzvAOlLpVMSYyPb5nwACkc2dDo42Huy3hyP83lSfaCiQ
Qkfvu4XglLvio0T/Ym1+dHYAEOdxn3ZdJDK2/UUuPTZwDjQbbI1+hHdIL3cJg7eH
imBSQz3aiaoOL98/CBtwOromNEeKlLzqLqVZO9qiJgWJlLgbXtJEGRjp/BKYZwYy
EFwxGPL0kEyS8LcGZbGVrRWrXgYerzhYahKuVgtV26HlNeml2c7bd0g7ldM5Tzzc
K8g6/sH1/Kx0DUsRsx2EiCitC9DE3mXn5ZYsWxMTYduFPR6T6qcCkNML6ZlSWhHS
Oi/bcQs3sNLOyCmkcXbxPHHTfPtrX7Zenj8JPSh8tkDmup9YqmtD1QHsqySxKpK1
eDWexdJBD/Ds5waDGitk
=9ygd
-----END PGP SIGNATURE-----
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: mail@joeconway.com, bruce@momjian.us, borz_off@cs.msu.su
Subject: Re: BUG #8399: inconsistent input of multidimensional arrays
In-Reply-To: <52EC51F5.1020701@joeconway.com>
References: <E1VEETa-0007KM-8O@wrigleys.postgresql.org> <20140201011125.GG19957@momjian.us> <52EC51F5.1020701@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox