Re: pgsql crollable cursor doesn't support one form of postgresql's cu - Mailing list pgsql-hackers

From Neil Conway
Subject Re: pgsql crollable cursor doesn't support one form of postgresql's cu
Date
Msg-id 1177650074.6440.77.camel@localhost.localdomain
Whole thread Raw
In response to Re: pgsql crollable cursor doesn't support one form of postgresql's cu  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pgsql crollable cursor doesn't support one form ofpostgresql's cu  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
List pgsql-hackers
I haven't read the rest of the thread yet, but is this hunk not buggy?
yylex() is side-effecting, so the two calls to yylex() do not do what
the comment suggests.

> *** 2083,2091 ****
>               check_FROM = false;
>       }
> 
> !     /* check FROM keyword after direction's specification */
> !     if (check_FROM && yylex() != K_FROM)
> !             yyerror("expected \"FROM\"");
> 
>       return fetch;
>   }
> --- 2089,2097 ----
>               check_FROM = false;
>       }
> 
> !     /* check FROM or IN keyword after direction's specification */
> !     if (check_FROM && (yylex() != K_FROM && yylex() != K_IN))
> !             yyerror("expected \"FROM/IN\"");
> 
>       return fetch;

-Neil




pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: too much WAL volume
Next
From: "Pavel Stehule"
Date:
Subject: Re: pgsql crollable cursor doesn't support one form ofpostgresql's cu