From: | Dave Cramer <Dave(at)micro-automation(dot)net> |
---|---|
To: | Toby <toby(at)paperjet(dot)com> |
Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: jdbc cursor positioning |
Date: | 2002-10-07 00:48:55 |
Message-ID: | 1033951736.20053.0.camel@inspiron.cramers |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
No, postgres fully supports cursors, the problem must be somewhere else.
Dave
On Sun, 2002-10-06 at 15:27, Toby wrote:
> as i understand it, postgres doesn't yet support cursors. however, with the
> LIMIT and OFFSET modifiers in a SELECt you can get the same behaviour.
>
> SELECT <fields> FROM <table> ORDER BY <field> LIMIT <recsPerPage>
> OFFSET <offset>
>
> <fields> is the fields to select
> <table> is the table you're selecting from
> <recsPerPage> is an integer 1..n for the number of records per page.
> <offset> is calculated as ((page - 1) * recsPerPage) where the page number
> is 1..n
>
> make sure you order your select by something, else the records in a page
> may not quite make sense.
>
> toby
From | Date | Subject | |
---|---|---|---|
Next Message | Aaron Mulder | 2002-10-07 01:26:02 | DBMD Patch |
Previous Message | Toby | 2002-10-06 19:27:13 | Re: jdbc cursor positioning |