Re: Postgres SQL unable to handle Null values for Text datatype

Поиск
Список
Период
Сортировка
От Lutz Horn
Тема Re: Postgres SQL unable to handle Null values for Text datatype
Дата
Msg-id 3FD5BCF2-345C-4814-8657-B2E1E39D02CB@lhorn.de
обсуждение исходный текст
Ответ на Postgres SQL unable to handle Null values for Text datatype  (Karthik K L V <venkata.karthik4u@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Karthik K L V
Дата:
Сообщение: Postgres SQL unable to handle Null values for Text datatype
Следующее
От: "Lahnov, Igor"
Дата:
Сообщение: RE: Unable to start replica after failover