Re: Hook for extensible parsing.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Hook for extensible parsing.
Дата
Msg-id 984300.1631719616@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Hook for extensible parsing.  (Jim Mlodgenski <jimmy76@gmail.com>)
Ответы Re: Hook for extensible parsing.  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
Jim Mlodgenski <jimmy76@gmail.com> writes:
> On Wed, Sep 15, 2021 at 9:25 AM Simon Riggs
> <simon.riggs@enterprisedb.com> wrote:
>> The general rule has always been that we don't just put hooks in, we
>> always require an in-core use for those hooks. I was reminded of that
>> myself recently.

> That's not historically what has happened. There are several hooks with
> no in core use such as emit_log_hook and ExplainOneQuery_hook.

Yeah.  I think the proper expectation is that there be a sufficiently
worked-out example to convince us that the proposed hooks have real-world
usefulness, and are not missing any basic requirements to make them do
something useful.  Whether the example ends up in our tree is a
case-by-case decision.

In the case at hand, what's troubling me is that I don't see any
particular use in merely substituting a new bison grammar, if it
still has to produce parse trees that the rest of the system will
understand.  Yeah, you could make some very simple surface-syntax
changes that way, but it doesn't seem like you could do anything
interesting (like, say, support Oracle-style outer join syntax).
AFAICS, to get to a useful feature, you'd then need to invent an
extensible Node system (which'd be hugely invasive if it's feasible
at all), and then probably more things on top of that.  So I'm not
convinced that you've demonstrated any real-world usefulness.

            regards, tom lane



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Trigger position
Следующее
От: Tom Lane
Дата:
Сообщение: Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails