Re: Hook for extensible parsing.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Hook for extensible parsing.
Дата
Msg-id 1023941.1631725020@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Hook for extensible parsing.  (Julien Rouhaud <rjuju123@gmail.com>)
Ответы Re: Hook for extensible parsing.  (Julien Rouhaud <rjuju123@gmail.com>)
Re: Hook for extensible parsing.  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Julien Rouhaud <rjuju123@gmail.com> writes:
> I'm not sure why you couldn't implement an Oracle-style outer join
> with such a hook?

Try it.

> The requirement is that the parser can't leak any
> node that the rest of the system doesn't know about, but you can do
> what you want inside the parser.

That's not what the patch actually does, though.  It only replaces
the grammar, not semantic analysis.  So you couldn't associate the
(+)-decorated WHERE clause with the appropriate join.  (And no,
I will not accept that it's okay to perform catalog lookups in
the grammar to get around that.  See comment at the head of gram.y.)

In general, I'm having a hard time believing that anything very
interesting can be done at only the grammar level without changing
the parse analysis phase.  That's not unrelated to the restriction
that the grammar can't do catalog accesses.  Maybe with some fundamental
restructuring, we could get around that issue ... but this patch isn't
doing any fundamental restructuring, it's just putting a hook where it's
easy to do so.  We've often found that such hooks aren't as useful as
they initially seem.

            regards, tom lane



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Partial index "microvacuum"
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Hook for extensible parsing.