Re: BUG #8399: inconsistent input of multidimensional arrays

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: BUG #8399: inconsistent input of multidimensional arrays
Дата
Msg-id 52EC51F5.1020701@joeconway.com
обсуждение исходный текст
Ответ на Re: BUG #8399: inconsistent input of multidimensional arrays  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: BUG #8399: inconsistent input of multidimensional arrays  (Joe Conway <mail@joeconway.com>)
Список pgsql-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-----

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #8399: inconsistent input of multidimensional arrays
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #8438: Usage of Pipe operator in Windows(CMD.exe) shows the password typed with any PG utility.