Re: Not seeing script error - Mailing list pgsql-general

From Rich Shepard
Subject Re: Not seeing script error
Date
Msg-id e699e6e3-fdac-f775-b2ab-7de21ab3d5@appl-ecosys.com
Whole thread Raw
In response to Re: Not seeing script error  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Not seeing script error
Next
From: "Peter 'PMc' Much"
Date:
Subject: Re: Collation again here