Re: move 0 behaviour - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: move 0 behaviour
Date
Msg-id 200211020541.gA25fS329715@candle.pha.pa.us
Whole thread Raw
In response to Re: move 0 behaviour  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: move 0 behaviour  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Tom Lane wrote:
> >> Do not hack up PerformPortalFetch; put the special case for INT_MAX in
> >> utility.c's FetchStmt code, instead.  As-is, you probably broke other
> >> callers of PerformPortalFetch.
> 
> > I thought about that, but I need to fail if the cursor name is invalid. 
> 
> What has that got to do with it?

If I put the 'return' for 0 MOVE/FETCH in utility.c's FetchStmt code, I
will not get the checks for invalid cursor names, and I will not get the
proper return tag.   I don't see how to do anything in utility.c.  I
assume this is the code you want to move to utility.c:+       /* If zero count, we are done */+       if (count == 0)+
            return;+ +       /* Internally, zero count processes all portal rows */+       if (count == INT_MAX)+
       count = 0;+               
 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: CONVERT function is seriously broken
Next
From: Bruce Momjian
Date:
Subject: Re: 7.2.3 vacuum bug