| От | adjkldd@126.com |
|---|---|
| Тема | confusing `case when` column name |
| Дата | |
| Msg-id | 336abc39.8084.18e32ad7ffc.Coremail.winterloo@126.com обсуждение исходный текст |
| Ответы |
Re: confusing `case when` column name
|
| Список | pgsql-hackers |
Hi hackers,Below is a `case when` demo,```sqlcreate table foo(a int, b int);insert into foo values (1, 2);select case 1 when 1 then a else b end from foo;```Currently, psql output is,```textb --- 1 (1 row)```At the first glance at the output column title, I assume the result of the sql is wrong. It should be `a`.After some investigation, I discovered that the result's value is accurate. However, PostgreSQL utilizesbas the title for the output column.Nee we change the title of the case-when output column? If you hackers think it's worth the effort, I'm willing to invest time in working on it.Best Regards,Winter Loo
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера