Array Contained By Array Question

From: "Arthur M(dot) Kang" <arthurmkang(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Array Contained By Array Question
Date: 2011-06-10 16:00:23
Message-ID: 4DF23F97.2040109@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

How can I search a multidimensional array for an EXACT "subarray" match?

The following produces true when I want it to produce false. Obviously,
I would only want it to produce true for ARRAY[1,2], ARRAY[3,4], or
ARRAY[5,6].

SELECT ARRAY[ARRAY[1,2], ARRAY[3,4], ARRAY[5,6]] @> ARRAY[ARRAY[1,6]];

Any help is greatly appreciated.

Thanks.

Arthur

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Merlin Moncure 2011-06-10 17:31:07 Re: Array Contained By Array Question
Previous Message Charles N. Charotti 2011-06-10 13:24:35 Re: Indenting PLPGSQL code