| От | Lew |
|---|---|
| Тема | Re: GROUP BY column alias? |
| Дата | |
| Msg-id | hll0s4$aof$1@news.albasani.net обсуждение |
| Ответ на | Re: GROUP BY column alias? ("Eric B. Ridge" <ebr@tcdi.com>) |
| Ответы |
Re: GROUP BY column alias?
|
| Список | pgsql-general |
Scott Bailey wrote: >> SQL name resolution rules are that column names >> have higher precedence than aliases and variables. >> So it will always bind to the column not the alias. Eric B. Ridge wrote: > That explains it. Thanks. Breaks the rule of least surprise, but it is SQL. I don't think it does break the rule of least surprise. How would one expect the column or the alias to have precedence without knowledge of the rule from documentation? The only thing I would expect if I were unaware of the rule is that there might be a conflict and that I'd have to look up the precedence. -- Lew
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера