Re: Surprisingly forgiving behavior when a case expression is terminated with "end case"
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Surprisingly forgiving behavior when a case expression is terminated with "end case" |
| Дата | |
| Msg-id | 370703.1660159073@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Surprisingly forgiving behavior when a case expression is terminated with "end case" (Bryn Llewellyn <bryn@yugabyte.com>) |
| Ответы |
Re: Surprisingly forgiving behavior when a case expression is terminated with "end case"
|
| Список | pgsql-general |
Bryn Llewellyn <bryn@yugabyte.com> writes:
> Moreover CASE is a reserved word—as a "create table case(…)" attempt shows. Yet CASE is tolerated (using PG 14.4)
here:
> select 1 as case;
> In fact, any reserved word that I try (like IF, THEN, and so on) is accepted as an alias. This seems to me to be
wrong.What do you (all) think?
I think we've spent a great deal of blood, sweat, and tears
making that so, or as nearly so as we could. We will in
fact take any keyword after "AS", and in recent versions many
non-reserved keywords will work that way without "AS".
(Mind you, I think the SQL spec made a serious design error
in allowing "AS" to be optional. But we have to live with that
as best we can.)
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера