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

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

On Tue, Feb 4, 2014 at 11:21:24AM -0800, Jeff Davis wrote:
> 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?

Yes. the problem was that the new checking would throw an error for that
misformed array.

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

Here is the spot in the thread where I replied:

http://www.postgresql.org/message-id/20140201011125.GG19957@momjian.us

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2014-02-05 01:15:00 pgsql: PL/Perl: Fix compiler warning
Previous Message Robert Haas 2014-02-04 20:28:45 Re: Viability of text HISTORY/INSTALL/regression README files (was Re: [COMMITTERS] pgsql: Document a few more regression test hazards.)