Re: Hook for extensible parsing. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Hook for extensible parsing.
Date
Msg-id 1023941.1631725020@sss.pgh.pa.us
Whole thread Raw
In response to Re: Hook for extensible parsing.  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: Hook for extensible parsing.
Re: Hook for extensible parsing.
List 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 by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Partial index "microvacuum"
Next
From: Julien Rouhaud
Date:
Subject: Re: Hook for extensible parsing.