Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdtWW-006KBu-1a for pgsql-general@arkaria.postgresql.org; Thu, 08 Jan 2026 17:10:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdtWU-003SkS-3C for pgsql-general@arkaria.postgresql.org; Thu, 08 Jan 2026 17:10:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdtWU-003SkJ-25 for pgsql-general@lists.postgresql.org; Thu, 08 Jan 2026 17:10:11 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdtWT-005JZ0-0D for pgsql-general@postgresql.org; Thu, 08 Jan 2026 17:10:11 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 93FB62A14D6 for ; Thu, 8 Jan 2026 09:10:06 -0800 (PST) Date: Thu, 8 Jan 2026 09:10:06 -0800 (PST) From: Rich Shepard To: pgsql-general@postgresql.org Subject: Re: Not seeing script error In-Reply-To: <1971486.1767890927@sss.pgh.pa.us> Message-ID: References: <72d71614-3fa0-1a27-c271-a83ee759941a@appl-ecosys.com> <1971486.1767890927@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 8 Jan 2026, Tom Lane wrote: > AND binds more tightly than OR. I think you meant > where p.email is not null and > (industry = 'Chemicals' or > industry = 'Energy' or > industry = 'Food processor' or > industry = 'Manufacturing' or > industry = 'Maritime' or > industry = 'Transportation' or > industry = 'Wood products') Tom, While I'm aware that AND binds tigher than OR, I totally missed the need to package all industry names within parentheses. > BTW, using IN might make this more compact. And, it enforces industry types to be in parentheses. Thanks very much, Rich