PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » MDB2_Driver_pgsql » Bug #7059

pgsql error code mapping cannot handle localized error messages

Details

Request #7059pgsql error code mapping cannot handle localized error messages
Submitted2006-03-08 10:39 UTC
Fromsacher at manetmail dot de
StatusOpen
PackageMDB2_Driver_pgsql
PHP Version5.0.4
OSLinux SuSE10.0 i386
Roadmaps(Not assigned)

Comments

[2006-03-08 10:39 UTC] sacher at manetmail dot de

Description:
------------
The documentation says that a sequence will automatically be created on nextID(.., true).

nextID returns a DB_Error like this:
DB Error: unknown error
-1
SELECT NEXTVAL('test_seq') [nativecode=FEHLER: Relation »test_seq« existiert nicht]
(relation does not exist)

Reason seems to be the return code of the used PostgreSQL which is not the one expected by nextID().

If uncomment the condition in
DB/pqsql.php Line 681 $result->getCode() == DB_ERROR_NOSUCHTABLE
everything works fine.

Used db is PostgreSQL 7.4.8

[2006-03-08 11:32 UTC] sacher at manetmail dot de

Thanks for pointing me at this.

Would'n it be nice to switch between detect errors by msg or by code?