Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 20109

Summary: PEAR's DB abstraction layer for PostgreSQL broken: 'LIMIT #,#' should become 'LIMIT # OFFSET #'
Product: Gentoo Linux Reporter: Dries Buytaert <mail>
Component: [OLD] DevelopmentAssignee: Masatomo Nakano (RETIRED) <nakano>
Status: RESOLVED NEEDINFO    
Severity: major CC: esigra
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dries Buytaert 2003-04-28 11:54:21 UTC
PostgreSQL no longer supports the use of 'LIMIT #,#' in SQL queries.  The PostgreSQL backend for the PEAR database abstraction layer needs to be updated to this extend.  Gentoo installs PostgreSQL 7.3.2 (at the time of this writing).  As such, this might break many PHP applications.  As a quick fix, change the function 'modifyLimitQuery' of '/usr/lib/php/DB/pgsql.php':

  $query = $query . " LIMIT $count OFFSET $from";

Reproducible: Always
Steps to Reproduce:

1.
2.
3.
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2004-03-15 11:52:46 UTC
is this bug still valid?
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-07-04 16:21:49 UTC
no response from user, closing bug.