Skip site navigation (1) Skip section navigation (2)

Re: pgsql crollable cursor doesn't support one form ofpostgresql's cu

From: Neil Conway <neilc(at)samurai(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)hotmail(dot)com>, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgsql crollable cursor doesn't support one form ofpostgresql's cu
Date: 2007-04-27 05:01:14
Message-ID: 1177650074.6440.77.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: 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



In response to

Responses

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2007-04-27 05:36:33
Subject: Re: pgsql crollable cursor doesn't support one form ofpostgresql's cu
Previous:From: Greg SmithDate: 2007-04-27 03:58:19
Subject: Re: too much WAL volume

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group