| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
| Cc: | Dave Cramer <dave(at)fastcrypt(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: move 0 behaviour |
| Date: | 2002-10-31 04:52:28 |
| Message-ID: | 200210310452.g9V4qTF02535@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-hackers pgsql-jdbc |
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 there. Seems MOVE 0 is the logical way to do that.
> > (I can't think of another reasonable value).
>
> It would seem more logical and reasonable for MOVE 0 to do nothing and
> have some special syntax such as MOVE LAST to move to the end. (MOVE LAST
> would actually be consistent with the standard syntax FETCH LAST.)
Yea, I started thinking and we need to get MOVE/FETCH to make sense.
The following patch makes FETCH/MOVE 0 do nothing, and FETCH LAST move
to the end. I was going to use the word END, but if LAST is more
standard, we will use that. It uses INT_MAX in the grammar for FETCH
ALL/MOVE LAST, but maps that to zero so it is consistent in the
/executor code.
I will keep this patch for 7.4.
JDBC folks, I realize you need this. Seems you will have to use MOVE 0
for 7,3 and MOVE LAST for 7.4.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
| Attachment | Content-Type | Size |
|---|---|---|
| unknown_filename | text/plain | 6.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2002-10-31 05:16:47 | Re: move 0 behaviour |
| Previous Message | chengwen Wu | 2002-10-31 02:14:15 | TPCC test in postgreSQL 7.3 beta3 |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Neil Conway | 2002-10-31 04:54:50 | Re: 7.2.3 vacuum bug |
| Previous Message | Tom Lane | 2002-10-31 04:40:05 | Re: 7.2.3 vacuum bug |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2002-10-31 05:16:47 | Re: move 0 behaviour |
| Previous Message | Ross J. Reedstrom | 2002-10-30 21:44:12 | Re: Case Sensitivity |