Re: Postgres SQL unable to handle Null values for Text datatype - Mailing list pgsql-general

From Lutz Horn
Subject Re: Postgres SQL unable to handle Null values for Text datatype
Date
Msg-id 3FD5BCF2-345C-4814-8657-B2E1E39D02CB@lhorn.de
Whole thread Raw
In response to Postgres SQL unable to handle Null values for Text datatype  (Karthik K L V <venkata.karthik4u@gmail.com>)
List pgsql-general
> org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bytea

This has been discussed on Stack Overflow[0].

The answer with the highest approval suggests to use coalesce[1]:

```
Select * from A where middle_name = coalesce(?1)
```

Lutz

[0] https://stackoverflow.com/a/54223586
[1] https://www.postgresql.org/docs/current/functions-conditional.html#FUNCTIONS-COALESCE-NVL-IFNULL


pgsql-general by date:

Previous
From: Karthik K L V
Date:
Subject: Postgres SQL unable to handle Null values for Text datatype
Next
From: "Lahnov, Igor"
Date:
Subject: RE: Unable to start replica after failover