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, Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: Some array semantics issues
Date: 2005-11-19 01:56:13
Message-ID: 15714.1132365373@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:
> [ this is back up-thread a bit ]
> And changing that would make it harder to test just the contents of the array
> without having to match bounds as well. That is, You couldn't say "list =
> '{1,2}'" to test if the array contained 1,2. You would have to, well, I'm not
> even sure how you would test it actually. Maybe something kludgy like
> "'{}'::int[] || list = '{1,2}'" ?

Given the just-committed changes to avoid having array_push/array_cat
generate non-spec lower bounds unnecessarily, do you still think it's
important to have a variant of array comparison that ignores lower
bounds?

ISTM that ignoring lower bounds is definitely something that violates
the principle of least surprise. There was an ease-of-use argument
for it before, but now that we changed the other thing I think we don't
need such a kluge.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-11-19 02:17:02 Re: someone working to add merge?
Previous Message Grzegorz Jaskiewicz 2005-11-19 01:24:25 Re: order by, for custom types