Re: Initial review of xslt with no limits patch

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: Initial review of xslt with no limits patch
Дата
Msg-id 626F24C9-655C-49AA-A95E-7575510EB10A@kineticode.com
обсуждение исходный текст
Ответ на Re: Initial review of xslt with no limits patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Aug 6, 2010, at 9:59 PM, Tom Lane wrote:

> It's not immediately clear to me what an ordered-pair type would get you
> that you don't get with 2-element arrays.

Just syntactic sugar, really. And control over how many items you have (a bounded pair rather than an unlimited element
array).

> A couple of quick experiments suggest that 2-D arrays might be the thing
> to use.  They're easy to construct:
>
> regression=# select array[[1,2],[3,4]];
>     array
> ---------------
> {{1,2},{3,4}}
> (1 row)
>
> and you can build them dynamically at need:
>
> regression=# select array[[1,2],[3,4]] || array[5,6];
>      ?column?
> ---------------------
> {{1,2},{3,4},{5,6}}
> (1 row)
>
> This is not exactly without precedent, either: our built-in xpath()
> function appears to use precisely this approach for its namespace-list
> argument.

Agreed.

Best,

David



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Initial review of xslt with no limits patch
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Initial review of xslt with no limits patch