Re: string not equal query, postgresql 9.4.4 - Mailing list pgsql-admin

From David G. Johnston
Subject Re: string not equal query, postgresql 9.4.4
Date
Msg-id CAKFQuwawTZkzW75hfU_shS-_uEW7AGw83b_G0ZuWNc6+TFLcXw@mail.gmail.com
Whole thread Raw
In response to Re: string not equal query, postgresql 9.4.4  (John Scalia <jayknowsunix@gmail.com>)
Responses Re: string not equal query, postgresql 9.4.4  (John Scalia <jayknowsunix@gmail.com>)
List pgsql-admin
On Thu, Sep 17, 2015 at 6:18 PM, John Scalia <jayknowsunix@gmail.com> wrote:

SELECT * FROM results where result <> 'PASS';

and it produced all the rows, not just the ones beginning with visc60 that I expected. Based on what you had written, I should have seen the correct output. So, any ideas?

​EXPLAIN ANALYZE SELECT * FROM results WHERE result <> 'PASS';

What happens when you run the following?  Do you see the same incorrect behavior?

WITH vals (v) AS (
VALUES ('PASS'::char(4)), ('FAIL'::char(4))
)
SELECT 
​DISTINCT ​
*
FROM vals
WHERE v <> 'PASS'::char(4);

David J.​
 

pgsql-admin by date:

Previous
From: John Scalia
Date:
Subject: Re: string not equal query, postgresql 9.4.4
Next
From: John Scalia
Date:
Subject: Re: string not equal query, postgresql 9.4.4