Re: Hook for extensible parsing.

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: Hook for extensible parsing.
Дата
Msg-id 20220117003334.oisr3eucfnhutwl5@jrouhaud
обсуждение исходный текст
Ответ на Re: Hook for extensible parsing.  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
Hi,

On Fri, Sep 24, 2021 at 02:33:59PM +0800, Julien Rouhaud wrote:
> On Thu, Sep 23, 2021 at 10:21:20AM -0400, Tom Lane wrote:
> > 
> > I do have sympathy for the idea that extensions would like to define
> > their own statement types.  I just don't see a practical way to do it
> > in our existing parser infrastructure.  This patch certainly doesn't
> > offer that.
> 
> Allowing extensions to define their own (utility) statement type is just a
> matter of allowing ExtensibleNode as top level statement.  As far as I can
> see the only change required for that is to give those a specific command tag
> in CreateCommandTag(), since transformStmt() default to emitting a utility
> command.  You can then easily intercept such statement in the utility hook and
> fetch your custom struct.
> 
> I could do that but I'm assuming that you still wouldn't be satisfied as
> custom parser would still be needed, whihc may or may not require to
> copy/paste chunks of the core grammar?
> 
> If so, do you have any suggestion for an approach you would accept?

Given the total lack of answer on the various improvements I suggested, I'm
assuming that no one is interested in that feature, so I'm marking it as
Rejected.



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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: [PATCH] rename column if exists
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: drop tablespace failed when location contains .. on win32