incomplete CTE declaration and "column reference x is ambiguous"

Поиск
Список
Период
Сортировка
От Marc Mamin
Тема incomplete CTE declaration and "column reference x is ambiguous"
Дата
Msg-id B6F6FD62F2624C4C9916AC0175D56D880CE0135F@jenmbs01.ad.intershop.net
обсуждение исходный текст
Ответы Re: incomplete CTE declaration and "column reference x is ambiguous"  (David Johnston <polobo@yahoo.com>)
Список pgsql-general
Hello,
 
I've lost some time to debug a large Query with many CTE.
I couldn't  really believe the error message.
 
it was correct after all , though surprising.
a short version to illustrate my error:
 
WITH t1 (a,b) AS (
        SELECT
                        1 as x,
                2 as a,
                3 as b
        )
select * from t1 WHERE b =0
 
ERROR: column reference "b" is ambiguous.
 
 
It would be nice, if extra undeclared columns would not be visible outside the CTE.
 
regards,
 
Marc Mamin
 
 

В списке pgsql-general по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: (Default) Group permissions
Следующее
От: Michael Orlitzky
Дата:
Сообщение: Re: (Default) Group permissions