Re: Some array semantics issues

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Some array semantics issues
Date: 2005-11-16 21:03:15
Message-ID: 10797.1132174995@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)edu> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2005-11-16 21:08:05 Re: Some array semantics issues
Previous Message Greg Stark 2005-11-16 20:50:29 Re: Some array semantics issues