|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22696 modifyLimitQuery not compatible with PostgreSQL 7.3
Submitted: 2003-03-14 04:15 UTC Modified: 2003-04-29 07:07 UTC
Avg. Score:5.0 ± 0.0
Reproduced:8 of 8 (100.0%)
Same Version:1 (12.5%)
Same OS:2 (25.0%)
From: marco at telug dot it Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.3.2RC1, 4.3.2rc2 OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
8 + 5 = ?
Subscribe to this entry?

 [2003-03-14 04:15 UTC] marco at telug dot it
Description of problem:
The method modifyLimitQuery() in DB/pgsql.php does not work
with postgresql 7.3, as postgresql 7.3 does not support
anymore the syntax "LIMIT #,#".
To solve the problem, a patch from the CVS (committed after
the PHP 4.3.0 release) is needed:

Marco Pratesi


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-12 10:44 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

technically this is probably broken for old versions of postgres now.. but I guess thats life..
 [2003-04-29 07:04 UTC] marco at telug dot it
> This bug has been fixed in CVS.

I know that it is fixed in the CVS, but it should be fixed
also in the official stable release, while the bug is still
present in PHP 4.3.2rc2, as the tarball of 4.3.2rc2 still
ships DB-1.3.tar, which is still affected by this bad bug.

This way, my applications based on PHP and PostgreSQL
do not run on all providers that run an updated and stable
version of PHP and an updated and stable version of
PostgreSQL and IMO this is not a minor problem, also
because I'm not the sys admin of all servers.

OK, the bug is fixed in the CVS, but, please, be kind,
fix it also in the official release.

> technically this is probably broken for old versions of
> postgres now..

No, it is not: "LIMIT #,#" runs only on old versions
of PostgreSQL, hence it causes problems; on the contrary,
"LIMIT # OFFSET #" runs both on PostgreSQL 7.3 and on
older versions (I have already tried on my servers).
Hence the bug fix hasn't any side effect.

Marco Pratesi
 [2003-04-29 07:07 UTC]

Thank's for the report.

But please, keep this bug closed. Fixed in cvs mean it should be fixed in the *DB* release, nothing to do with PHP release process.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 08 13:03:41 2021 UTC