Re: Re: [PATCHES] Select parser at runtime

Jan Wieck <janwieck@yahoo.com>

From: Jan Wieck <JanWieck@Yahoo.com>
To: Ian Lance Taylor <ian@airs.com>
Cc: Vince Vielhaber <vev@michvhf.com>, Justin Clift <justin@postgresql.org>, Peter Eisentraut <peter_e@gmx.net>, PostgreSQL Development <pgsql-hackers@postgresql.org>
Date: 2001-08-13T13:55:59Z
Lists: pgsql-hackers
Ian Lance Taylor wrote:
> Along these lines, I don't think Bruce's suggestion of modifications
> to the Postgres gram.y is a good idea, because it causes the Oracle
> parser to add an ongoing cost to the Postgres parser.

    Bruce,  Tom  and  I discussed these issues during our time in
    San Diego last month.

    If we want to have both parsers available at runtime we  need
    to  replace the YY (case-insensitive) prefix in the generated
    files per parser and call the right one from tcop.   Now  for
    some flex/bison combo's at least the prefix switches (to have
    something different than YY) don't work reliable. There  will
    be  some  global  YY-objects  left, causing linkage problems.
    That's why PL/pgSQL's scanner/parser's C-code is run  through
    sed(1).

    If  Bruce's  suggestion  of having both parsers in one source
    with #ifdef, #else, #endif is better  than  separate  sources
    depends  mainly  on  how big the differences finally will be.
    Doesn't really  bother  me.  Maybe  we  could  start  with  a
    combined  one  and  separate  later if it turns out that they
    drift apart too much?


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com