Re: BUG #14919: Invalid column in sub select is still a valid select

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #14919: Invalid column in sub select is still a valid select
Дата
Msg-id CAB7nPqRRzG1MfN8m2V7m64BNbYk-tuHsgDcOYzGVBkRJrXrB_Q@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #14919: Invalid column in sub select is still a valid select  (tanes@siamscan.net)
Ответы Re: BUG #14919: Invalid column in sub select is still a valid select  (Tanes Sriviroolchai <tanes@siamscan.net>)
Список pgsql-bugs
On Mon, Nov 20, 2017 at 4:26 PM,  <tanes@siamscan.net> wrote:
> Not sure if this is a bug or feature but when I query with sub select while
> sub select has invalid column the query is still valid and running. For
> example:
>
> create temp table a ( id integer, descr text);
> create temp table b ( b_id integer, descr text);
>
> # select * from a where id=(select id from b where descr='A');
>
>  id | descr
> ----+-------
> (0 rows)
>
> # select id from b where descr='A';
>
> ERROR:  column "id" does not exist
> LINE 1: select id from b where descr='A';
>                ^

There is no bug here. The subquery should look at the column b_id
which is defined for relation b, so the error is normal.
-- 
Michael


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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: BUG #14581: invalid cache ID: 41 CONTEXT: parallel worker
Следующее
От: Tanes Sriviroolchai
Дата:
Сообщение: Re: BUG #14919: Invalid column in sub select is still a valid select