Re: Writeable CTEs and empty relations

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Writeable CTEs and empty relations
Дата
Msg-id 20913.1266028316@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Writeable CTEs and empty relations  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Writeable CTEs and empty relations  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Feb 12, 2010 at 8:06 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> We could possibly put in some hack to disallow OLD/NEW references in
>> the WITH queries, but that got past my threshold of ugliness, so
>> I'm not going to commit it without further discussion.

> On the face of it it's not obvious to me why you wouldn't just do
> that.  If it's not valid to reference them there, then just don't let
> it happen (now comes the part where you tell me why it's not that
> simple).

Well, there's no obvious-to-the-user reason why it shouldn't work.
If we hack it, then an example like I gave will give a "no such
table" error, and I'll bet long odds we'll get bug reports about it.

(Now maybe we could suppress the bug reports if we could get it to
print something more like "NEW can't be referenced in WITH", but
doing that seems significantly harder --- the way that I can see
to do it would be to not have NEW/OLD in the namespace while parsing
WITH, and that would lead to a pretty stupid error message.)
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: knngist patch support
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Patch: Remove gcc dependency in definition of inline functions