Re: Not seeing script error

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Not seeing script error
Дата
Msg-id e699e6e3-fdac-f775-b2ab-7de21ab3d5@appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Not seeing script error  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления: