Not seeing script error - Mailing list pgsql-general

From Rich Shepard
Subject Not seeing script error
Date
Msg-id 72d71614-3fa0-1a27-c271-a83ee759941a@appl-ecosys.com
Whole thread Raw
Responses Re: Not seeing script error
List pgsql-general
The script:

select p.person_nbr, p.fname, p.lname, p.job_title, p.direct_phone, p.email,
        c.company_nbr, c.company_name, c.industry
from people as p
inner join companies as c on p.company_nbr = c.company_nbr
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'
group by p.person_nbr, c.company_nbr
order by p.person_nbr;

The where condition, `p.email is not null' is not working; the results
include rows where email is null while all other columns are okay.

I had that condition following the industry conditions but that makes no
difference.

What have I missed?

TIA,

Rich



pgsql-general by date:

Previous
From: "Daniel Verite"
Date:
Subject: Re: Collation again here
Next
From: Tom Lane
Date:
Subject: Re: Not seeing script error