Re: trecherous subselect needs warning?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: trecherous subselect needs warning?
Дата
Msg-id 27137.1139334353@sss.pgh.pa.us
обсуждение исходный текст
Ответ на trecherous subselect needs warning?  (george young <gry@ll.mit.edu>)
Ответы Re: trecherous subselect needs warning?
Список pgsql-sql
george young <gry@ll.mit.edu> writes:
> This query returns zero rows:

> newschm3=# select run_id from s_bake where opset_id not in (select opset_id from opset_steps);
>  run_id
> --------
> (0 rows)

> But, by my mistake, table opset_steps has no column "opset_id"!
> Surely it should return an error, or at least a warning, not just an
> empty rowset.

Access to upper-level variables from subqueries is (a) useful and (b)
required by the SQL spec, so we are not going to start throwing warnings
about it.
        regards, tom lane


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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Filtering data based on timestamp
Следующее
От: george young
Дата:
Сообщение: Re: trecherous subselect needs warning?