| От | Jeff Eckermann |
|---|---|
| Тема | Appending null produces null? |
| Дата | |
| Msg-id | 08CD1781F85AD4118E0800A0C9B8580B09479B@NEZU обсуждение |
| Ответы |
Re: Appending null produces null?
|
| Список | pgsql-general |
extracts=# select bill_address1, bill_address2, bill_address1 || ' ' || bill_address2 from customers where external_id = 20037514; bill_address1 | bill_address2 | ?column? -----------------+---------------+---------- 6745 Avalon Ave | | (1 row) I know that the usual operations with 'null' will produce null, but I didn't expect it in the case of a text field being appended to another text field. No doubt that follows as a matter of strict principle, but the outcome makes no sense from a purely practical point of view. Is this really the intended behaviour? I know that I can work around this with a 'coalesce' or something similar, but that seems unnecessarily messy.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера