|
From: Roderick A. A. <raa...@ti...> - 2001-02-07 16:03:21
|
On Tue, 6 Feb 2001, Andrew Sharp wrote:
> if($CONFIG{sqllimit} == 1) {
> # this presuposes a limit statement in postgresql, but
> # I think it has them. If it doesn't it can be coded
> # around anyway.
PostgreSQL does have the limit clause which I believe is in the SQL92 and
SQL99 standards. It's easy to get into the MySQL (choose your own
database) has this feature or that thingy but for the most part PostgreSQL
follows the standands better than the other databases.
The problem with the limit statement is it is 'stateless'. It picks
the first 'n' records that meet the rest of the selection criteria.
There is no easy way to remember the current 'n' items at the database
level so the the next SELECT statement can pick the next 'n' items.
The better choice is to select all the records that meet the criteria -
using the DBI - and break them up into groups/bunches to display using a
display limit.
Since I've only been half following the discussion (subscribed to too many
other mailing lists - including two of the PostgreSQL lists) I'm not sure
where the 'convince Dieter' discussion is at currently. I was mostly
concerned over the repeated question about PostgreSQL having the LIMIT
clause but then realized the LIMIT discussion could be going down the
wrong road.
I hope that we convince Dieter to add some method of limiting the
selection and displayed list so please don't take this as a rebuke.
Good Computing,
Rod
--
I really need a signature block!
|