Re: Some array semantics issues - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Some array semantics issues
Date
Msg-id 10797.1132174995@sss.pgh.pa.us
Whole thread Raw
In response to Re: Some array semantics issues  (Greg Stark <gsstark@mit.edu>)
Responses Re: Some array semantics issues
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> Well, in that case what do you think about
>> {{1,2},{3,4},{5,6},{7,8}}
>> vs
>> {{1,2,3,4},{5,6,7,8}}

> In the first case the first element is {1,2} and in the second case the first
> element is {1,2,3,4} so from my point of view there's no way these are the
> same.

Well, then I think we're converging on agreement that array comparison
should always take into account the number of dimensions and the axis
lengths.  What seems still in question is whether to compare or ignore
the axis lower bounds.

I'd argue that ordinary equality should include the lower bounds, but
I'm willing to provide a separate operator (or whole btree opclass
if people want it) that ignores the lower bounds.  We just need a name.
Maybe ~=, ~<, etc?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Some array semantics issues
Next
From: David Fetter
Date:
Subject: Re: Some array semantics issues