Re: @> (contains)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: php(dot)pl(dot)prices(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: @> (contains)
Date: 2019-09-23 16:56:36
Message-ID: 10213.1569257796@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Sun, Aug 18, 2019 at 8:53 AM PG Doc comments form <noreply(at)postgresql(dot)org>
>> Noticed strange thin with @>
>> Query "select '{1,2}'::int[] @> '{1,2,2,2,2,2,2,2}'::int[]" returns true,
>> but first array contains even less elements then second.
>> I think it's a bug in "contains" logic, but don't know where to submit it.

> Its a valid interpretation of "contains", for this purpose each array is
> treated like a set (ignoring the cardinality of elements, and overall
> dimensionality), but it needs to be documented as behaving that way on that
> page.

Done now.

regards, tom lane

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2019-09-23 17:47:54 returning does not act as expected after viewing documentation
Previous Message Tom Lane 2019-09-23 14:42:32 Re: fix tags in v12 Release Notes