Re: Re: UNION JOIN vs UNION SELECT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: chris(at)bitmead(dot)com
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Re: UNION JOIN vs UNION SELECT
Date: 2000-08-29 00:27:27
Message-ID: 19627.967508847@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chris <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris 2000-08-29 00:58:23 Re: Re: UNION JOIN vs UNION SELECT
Previous Message Alfred Perlstein 2000-08-29 00:20:38 Re: INHERITS doesn't offer enough functionality