Re: pgsql: arrays: tighten checks for multi-dimensional input

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: arrays: tighten checks for multi-dimensional input
Date: 2014-02-04 19:21:24
Message-ID: 1391541684.15160.19.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Sat, 2014-02-01 at 15:49 +0000, Bruce Momjian wrote:
> arrays: tighten checks for multi-dimensional input
>
> Previously an input array string that started with a single-element
> array dimension would then later accept a multi-dimensional segment.
>
> BACKWARD INCOMPATIBILITY

-select cardinality('{{{1}},{{2,3},{3,4}}}'::int[]);
+select cardinality('{{{1,9},{5,6}},{{2,3},{3,4}}}'::int[]);
cardinality
-------------
8

I was a little confused by this change: the query changed, but the
results did not. Was that a bugfix, or were the original semantics
intentional?

I didn't immediately find the thread where this was discussed, so if you
send a link that might answer my question.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2014-02-04 19:29:20 Re: pgsql: Introduce replication slots.
Previous Message Tom Lane 2014-02-04 06:38:57 Re: Viability of text HISTORY/INSTALL/regression README files (was Re: [COMMITTERS] pgsql: Document a few more regression test hazards.)