Re: [GENERAL] Query with type char - Mailing list pgsql-general

From Christoph Moench-Tegeder
Subject Re: [GENERAL] Query with type char
Date
Msg-id 20170216103011.rpvau5ku37ef63jp@squirrel.exwg.net
Whole thread Raw
In response to [GENERAL] Query with type char  (Egon Frerich <egon@frerich.eu>)
List pgsql-general
## Egon Frerich (egon@frerich.eu):

> Why are there 0 rows? I expect 3 rows:

From your results I guess that sp3 IS NULL on the three rows where
it is not 'j'. You should use the correct comparison predicate for
this case, i.e. IS DISTINCT FROM instead of <>.
https://www.postgresql.org/docs/9.6/static/functions-comparison.html

Regards,
Christoph

--
Spare Space.


pgsql-general by date:

Previous
From: Egon Frerich
Date:
Subject: [GENERAL] Query with type char
Next
From: dhaval jaiswal
Date:
Subject: [GENERAL] Alternate way of xpath