BUG #2212: Extracting array from 2 dim array may be incorrect

From: "Walter Roeland" <wroeland(at)marcatel(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2212: Extracting array from 2 dim array may be incorrect
Date: 2006-01-26 03:38:56
Message-ID: 20060126033856.43745F0A2F@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2212
Logged by: Walter Roeland
Email address: wroeland(at)marcatel(dot)net
PostgreSQL version: 8.1.2
Operating system: Windows XP professional
Description: Extracting array from 2 dim array may be incorrect
Details:

Select (Array[5,8,1])[2] as E;
returns 8 (ok, dimension is lowerd from 1 to 0).

Select (Array[Array[3,2,2],Array[7,4,4],Array[5,8,1]])[3:3] as V;
returns {{5,8,1}} (I suppose this is ok, same dimension).

But:
Select (Array[Array[3,2,2],Array[7,4,4],Array[5,8,1]])[3] as V;
Returns Null, as far I understand it should return {5,8,1}, i.e. lowering
dimension from 2 to 1.

Note: the documentation is not specific about when extracting an element
lowers the dimension (eg. using [2]) and when not (e.g. using [2:2]).

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ansis 2006-01-26 10:06:23 BUG #2213: lack of codepage Windows CP1257
Previous Message Tiago D. J. 2006-01-25 22:49:02 BUG #2211: select (1::float-1::float)*(-1) = -0 ??