Re: unnest on multi-dimensional arrays

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zev Benjamin <zev-pgsql(at)strangersgate(dot)com>, "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: unnest on multi-dimensional arrays
Date: 2013-12-03 19:16:32
Message-ID: CAFj8pRD1p_1nbGP1P59NexdW7Leymf4Zc9WFuCpkJDaJxZPT0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2013/12/2 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> Zev Benjamin <zev-pgsql(at)strangersgate(dot)com> writes:
> > This actually looks to mostly be a parser limitation:
>
> Well, you'd also need some execution-time infrastructure to evaluate an
> expression, if we allowed one there, but I agree it wouldn't be a
> tremendously complicated patch. We'd just not foreseen a good reason
> to support an expression ...
>

I afraid so it is not too simple.

There is problem with different target type when you do reduction from
array to scalar and from array to array sometimes (for different slice) -
so principally slice parameter should be immutable due immutable target
type. Although current solution is not enough protection against same
error, so then we allow a integer expression there.

Regards

Pavel

>
> regards, tom lane
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steven Schlansker 2013-12-03 20:51:32 Timing for release with fix for "Nov2013ReplicationIssue"
Previous Message Bruce Momjian 2013-12-03 16:18:25 Re: Trust intermediate CA for client certificates