php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47297 pdo_033.phpt fails on PgSQL
Submitted: 2009-02-04 07:24 UTC Modified: 2009-02-04 16:41 UTC
From: matteo at beccati dot com Assigned:
Status: Closed Package: PDO related
PHP Version: 5.3.0beta1 OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: matteo at beccati dot com
New email:
PHP Version: OS:

 

 [2009-02-04 07:24 UTC] matteo at beccati dot com
Description:
------------
The common test pdo_033.phpt fails on PgSQL because it's using a char(100) field, which will be right padded with spaces once retrieved, even though the actual output doesn't show that.

Using a char field with the correct size fixes the issue, while surely remaining compatible with other database type.

Reproduce code:
---------------
php -n run-tests.php --show-diff ext/pdo_pgsql/tests/common.phpt

Expected result:
----------------
PASS Postgres PDO Common: PDO::quote() [ext/pdo_pgsql/tests/pdo_033.phpt]


Actual result:
--------------
TEST 49/55 [ext/pdo/tests/pdo_033.phpt]
========DIFF========
005+             [t] =>  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     
005-             [t] =>  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

========DONE========
FAIL Postgres PDO Common: PDO::quote() [ext/pdo_pgsql/tests/pdo_033.phpt]


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-04 07:26 UTC] matteo at beccati dot com
Here's a patch: http://www.beccati.com/misc/pdo_pgsql_bug47297_php_5.3.patch
 [2009-02-04 16:41 UTC] felipe@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Thanks for the patch.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 01:01:33 2025 UTC