Re: Re: UNION JOIN vs UNION SELECT - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: UNION JOIN vs UNION SELECT
Date
Msg-id 19627.967508847@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: UNION JOIN vs UNION SELECT  (Chris <chrisb@nimrod.itg.telstra.com.au>)
List pgsql-hackers
Chris <chrisb@nimrod.itg.telstra.com.au> writes:
>> the grammar is just plain not LR(1) unless you
>> count UNION JOIN as a single token. 

> Would it be bad to make UNION JOIN as a single token?

That's exactly the solution I'm proposing.  However, it's pretty painful
to make the lexer do it directly (consider intervening comments, for
example) so what I have in mind is a filter between the parser and lexer
that does one-token lookahead when it finds a UNION token.  If next
token is JOIN, pass back just one UNIONJOIN token, else stash away the
second token to be returned on next call from parser.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Rob Browning
Date:
Subject: How hard would a "no global server" version be?
Next
From: Chris
Date:
Subject: Re: Re: UNION JOIN vs UNION SELECT