Re: [HACKERS] Open 6.5 items - Mailing list pgsql-hackers

From jwieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] Open 6.5 items
Date
Msg-id m10kSWD-000EBeC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Open 6.5 items  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
> shift/reduce conflict in grammar, SELECT ... FOR [UPDATE|CURSOR]

    Fixed.

    The  problem  was  that  CursorStmt tried to parse FOR UPDATE
    which is already parsed by SelectStmt.

    To fix it I had to add FOR READ ONLY to SelectStmt (returning
    NULL  for  forUpdate  as if empty) and let CursorStmt look at
    there for the elog(). Don't know if FOR READ ONLY is O.K. for
    regular  SELECT queries too, but I think it's better to allow
    this than to remove this syntax from CURSOR.

    The same error is still in the ecpg parser. AFAICS fixing  it
    the  same  way  there  would make ecpg accept the DECLARE/FOR
    UPDATE syntax because there is no Query where to  look  at  a
    forUpdate. Any suggestions?


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: "D'Arcy" "J.M." Cain
Date:
Subject: Re: [HACKERS] Open 6.5 items
Next
From: "Blyth A J C (Comp)"
Date:
Subject: It is doing my head in