Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwWH7-0008W9-97 for pgsql-sql@arkaria.postgresql.org; Fri, 07 Apr 2017 15:58:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cwWH6-0001jj-Ra for pgsql-sql@arkaria.postgresql.org; Fri, 07 Apr 2017 15:58:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cwWG3-0004lV-G0 for pgsql-sql@postgresql.org; Fri, 07 Apr 2017 15:57:07 +0000 Received: from mail-pg0-x233.google.com ([2607:f8b0:400e:c05::233]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cwWG0-0000JE-6h for pgsql-sql@postgresql.org; Fri, 07 Apr 2017 15:57:07 +0000 Received: by mail-pg0-x233.google.com with SMTP id 21so70559642pgg.1 for ; Fri, 07 Apr 2017 08:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=86NvO9C6z9q11m8ap5ExH2OchAP1CV5TGYMN1kRzhiQ=; b=K9xoBp102jpI5KaymJyUui+i7cPIaRLhdLeAElmY274Vwr01vMTxIhO+8Ign4yCesh xl+vhwPui6l4is5+xSCMsgWP2LTBhHJfYdZ6r8/obXLquH9Vo4XOuJXr74Y7+r92iC10 ga6m2+ibh0hSSBpgS9su31kWr6lZzX4BI96c62KZPFZZ5LYJHpbvfyIyUI+682N1TzhO l31+S/wxXZMpxIXRAITdv1Fiq0WvbB2J0TDBUrTfoaH0c4z0PjQLxmnxd9PUrAMTiLyI MYFEgaC/WtddoLaeCZz0mYexx7m9TMjRocqzPh8IDTVP4aZAkLBSBlN7LhBeFaHhttCa wPEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=86NvO9C6z9q11m8ap5ExH2OchAP1CV5TGYMN1kRzhiQ=; b=K0Eu18yJqdhd1P/wcv2PSggWt/+UjcGP5c3UTYX4oqQGVD5cLDmqBOXSTRlIiRC/QF JyJrwOSDZXqGpWEFjjjHaOOBKMYMyVhdOwPv0F0wKmmQ2WSSgGdx51l79GCgbNrtYKwE FtcpTZkUVDD2Gi5blEDS+mcj/rYYh0cbgQX5PaU9jXx+6pesUG7AL26CT96DmC0kwdR6 +cRelyGpRsZcCEAh2i6HSQq+1o3cv8zIaDXsb49B6NSq6+c/2ACAS+bqjaH301kdG7R7 iOd3uAy7HtAeFOg1++lMtT+xOQxpDuHWHO/q7BHJUEsz8mD5OfV5laT5rAnzgLkEj7+D ZIXA== X-Gm-Message-State: AFeK/H1TX6DiCGTGW53gPyKVNFUJm1VMMgFPkeWrbkR1I01C/RwZ2f4EvOj+fSAuVehdtA== X-Received: by 10.99.176.5 with SMTP id h5mr42539052pgf.179.1491580622289; Fri, 07 Apr 2017 08:57:02 -0700 (PDT) Received: from [155.100.214.120] ([155.100.214.120]) by smtp.gmail.com with ESMTPSA id r8sm10462725pfk.109.2017.04.07.08.57.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Apr 2017 08:57:00 -0700 (PDT) Subject: Re: death of array? To: "David G. Johnston" References: <73B8E1AF-BD4A-4E6A-B192-8394D59EF47C@gmail.com> <58E7319B.9090306@matrix.gatewaynet.com> <5fef6cfe-a47f-4276-f95f-259fb661276a@gmail.com> Cc: "pgsql-sql@postgresql.org" From: Rob Sargent Message-ID: Date: Fri, 7 Apr 2017 09:57:22 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------3BF35BB4BAB7E5F9E23BA24F" X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org This is a multi-part message in MIME format. --------------3BF35BB4BAB7E5F9E23BA24F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 04/07/2017 09:26 AM, David G. Johnston wrote: > On Fri, Apr 7, 2017 at 8:22 AM, Rob Sargent >wrote: > > Thank you both for your suggestions, but does either apply to > joining through the array in a flow of join operations? Or must I > do the work on the array in the where clause? > > > ​field = any(array_col) works anywhere ...​ > > ​David J. > ​ > Understood but true if any match is found, I need every array member to match as I want them all to be of a specific people as input into the query (so field = all(array_col)) and "field" here would be people_member.person_id and using that yields zero results in full query (very quickly though). But my understanding of the documentation of ALL is debatable. What does "the left-hand expression is evaluated" yield for people_member.person_id? The where clause would restrict it to one people_id but thats still more that what's in probandset.probands. --------------3BF35BB4BAB7E5F9E23BA24F Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 04/07/2017 09:26 AM, David G. Johnston wrote:
On Fri, Apr 7, 2017 at 8:22 AM, Rob Sargent <robjsargent@gmail.com> wrote:
Thank you both for your suggestions, but does either apply to joining through the array in a flow of join operations?  Or must I do the work on the array in the where clause?

​field = any(array_col) works anywhere ...​

​David J.
​

Understood but  true if any match is found, I need every array member to match as I want them all to be of a specific people as input into the query (so field = all(array_col))  and "field" here would be people_member.person_id and using that yields zero results in full query (very quickly though).

But my understanding of the documentation of ALL is debatable.  What does "the left-hand expression is evaluated" yield for people_member.person_id? The where clause would restrict it to one people_id but thats still more that what's in probandset.probands.
--------------3BF35BB4BAB7E5F9E23BA24F--