Re: Erratic error message "ERROR: column "id_compte" does
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Erratic error message "ERROR: column "id_compte" does |
| Дата | |
| Msg-id | 6025.1110986237@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Erratic error message "ERROR: column "id_compte" does (David Pradier <dpradier@apartia.fr>) |
| Ответы |
Re: Erratic error message "ERROR: column "id_compte" does
|
| Список | pgsql-hackers |
David Pradier <dpradier@apartia.fr> writes:
> One can access the columns of the main query from the subquery,
> therefore in my own query the column "id_compte" is found,
> therefore there is no error message.
> Doesn't this count as a bug ?
No; it's required behavior per the SQL specification. The spec doesn't
restrict the sub-query to reference outer columns in only some places;
it can use them anywhere.
(If you think that's weird, you should try putting the outer reference
in an aggregate function ... it then counts as an aggregate of the outer
query, not the inner. Also per spec.)
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера