Re: [HACKERS] move 0 behaviour

2002-11-02 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> Bruce Momjian <[EMAIL PROTECTED]> writes: > >>> 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

Re: [HACKERS] move 0 behaviour

2002-11-02 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Bruce Momjian <[EMAIL PROTECTED]> writes: >>> 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 >

Re: [HACKERS] move 0 behaviour

2002-11-01 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> 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

Re: [HACKERS] move 0 behaviour

2002-11-01 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > The following patch makes FETCH/MOVE 0 do nothing, and FETCH LAST move > > to the end. > > 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

Re: [HACKERS] move 0 behaviour

2002-10-30 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > The following patch makes FETCH/MOVE 0 do nothing, and FETCH LAST move > to the end. 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 PerformPortalFetc

Re: [HACKERS] move 0 behaviour

2002-10-30 Thread Bruce Momjian
Peter Eisentraut wrote: > Bruce Momjian writes: > > > So, that is why MOVE 0 goes to the end of the cursor. One idea would be > > for MOVE 0 to actually move nothing, but jdbc and others need the > > ability to move the end of the cursor, perhaps to then back up a certain > > amount and read from

Re: [HACKERS] move 0 behaviour

2002-10-30 Thread Peter Eisentraut
Bruce Momjian writes: > So, that is why MOVE 0 goes to the end of the cursor. One idea would be > for MOVE 0 to actually move nothing, but jdbc and others need the > ability to move the end of the cursor, perhaps to then back up a certain > amount and read from there. Seems MOVE 0 is the logical

Re: [HACKERS] move 0 behaviour

2002-10-30 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I did some research on this. It turns out the parser uses 0 for ALL, so > when you do a FETCH ALL it is passing zero. Now, when you do MOVE 0, > you are really asking for FETCH ALL and all the tuples are thrown away > because of the MOVE. Yeah. I thin

Re: [HACKERS] move 0 behaviour

2002-10-29 Thread Bruce Momjian
Dave Cramer wrote: > Currently there is a TODO list item to have move 0 not position to the > end of the cursor. > > Moving to the end of the cursor is useful, can we keep the behaviour and > change it to move end, or just leave it the way it is? I did some research on this. It turns out the par

[HACKERS] move 0 behaviour

2002-10-11 Thread Dave Cramer
Currently there is a TODO list item to have move 0 not position to the end of the cursor. Moving to the end of the cursor is useful, can we keep the behaviour and change it to move end, or just leave it the way it is? Dave ---(end of broadcast)-