From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Rod Taylor <rbt(at)rbt(dot)ca>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: integer ceiling in LIMIT and OFFSET |
Date: | 2003-10-22 14:57:21 |
Message-ID: | 20031022075012.I76172@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 22 Oct 2003, Christopher Kings-Lynne wrote:
> > I see you're point, but nobody is going to be interested in the first 2
> > billion rows of a table without using a cursor and having some other
> > process do the math in the background.
>
> You have the same problem:
>
> test=# begin;
> BEGIN
> test=# declare c cursor for select * from a;
> DECLARE CURSOR
> test=# move 2147483647 in c;
> MOVE 0
> test=# move 2147483648 in c;
> ERROR: syntax error at or near "2147483648" at character 6
> > That said, perhaps the TODO for changing LIMIT / OFFSET to be expression
> > based should also mention bumping them to int8.
>
> It is fairly hypothetical, but there are some people starting to put
> some rather large databases in Postgres these days. Shouldn't it at
> least be an unsigned integer?
It can't be for move/fetch since negative numbers are meaningful, and imho
it'd be fairly unintuitive for limit/offset to allow unsigned range but
move/fetch to only allow signed, although at least with move/fetch
multiple statements should work to get the position/count you want
(breaking it up into portions of no more than maxint).
From | Date | Subject | |
---|---|---|---|
Next Message | Rod Taylor | 2003-10-22 15:03:09 | Re: integer ceiling in LIMIT and OFFSET |
Previous Message | Christopher Kings-Lynne | 2003-10-22 14:22:18 | Re: integer ceiling in LIMIT and OFFSET |