Re: Not seeing script error

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Not seeing script error
Date: 2026-01-08 17:10:06
Message-ID: e699e6e3-fdac-f775-b2ab-7de21ab3d5@appl-ecosys.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter 'PMc' Much 2026-01-08 22:42:43 Re: Collation again here
Previous Message Ron Johnson 2026-01-08 17:03:29 Re: Not seeing script error