I have a strange problem with the following condition in a SELECT: AND (("TableData" = "inDate") OR ("inDate" IS NULL)) it works perfectly when the input date in the function (inDate) matchs a date in the table, but it does not work when the parameter inDate is NULL. I recall the function with pgadmin writing NULL as paramater. It seems that ("inDate" IS NULL) never returns true, even when the parameter is null... What's wrong? Lucazeo -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general