A way to refer to the "outer" query implicitly?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема A way to refer to the "outer" query implicitly?
Дата
Msg-id 87ad2cxumt.fsf@stark.xeocode.com
обсуждение исходный текст
Ответы Re: A way to refer to the "outer" query implicitly?
Список pgsql-general
My code constructs some queries by passing in constraint clauses like
 type = 'A'

However one of the constraint clauses is
 exists (select 1 from othertable where x = outertable.x)

This works fine, but requires that the caller know that the table being
queried will be "outertable". Is there any way in a subquery used like this to
implicitly reference fields from the outer query?

--
greg

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Generate char surrogate key
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump on older version of postgres eating huge