Re: Initial review of xslt with no limits patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Initial review of xslt with no limits patch
Date
Msg-id 6974.1281157159@sss.pgh.pa.us
Whole thread Raw
In response to Re: Initial review of xslt with no limits patch  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: Initial review of xslt with no limits patch
Re: Initial review of xslt with no limits patch
List pgsql-hackers
"David E. Wheeler" <david@kineticode.com> writes:
> I think that some sort of variadic pairs would be useful for this. But since there is no core "ordered pair" data
type,I don't think you're going to get too far.
 

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

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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Initial review of xslt with no limits patch
Next
From: "David E. Wheeler"
Date:
Subject: Re: Initial review of xslt with no limits patch