Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Request #7059 pgsql error code mapping cannot handle localized error messages
Submitted: 2006-03-08 10:39 UTC
From: sacher at manetmail dot de Assigned:
Status: Open Package: MDB2_Driver_pgsql
PHP Version: 5.0.4 OS: Linux SuSE10.0 i386
Roadmaps: (Not assigned)    

 [2006-03-08 10:39 UTC] sacher at manetmail dot de (Ronald Sacher)
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 10:42 UTC] lsmith
the pgsql driver cannot handled localized error messages.
 [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?
 [2006-03-08 11:33 UTC] lsmith
pgsql just recently gained support for error messages .. would be nice if you could investigate the support for them in php and provide a patch ..
 [2006-03-08 11:41 UTC] lsmith
fixed summary
 [2006-03-10 08:22 UTC] lsmith
This would have to be php5 only based on pg_result_error_field(). So the code would have to check for the existance of the given method and then use a different error code mapping. I am changing this from bug to feature request. I am also moving it to MDB2. However if we find a solution for MDB2 (since this is where most of the current development is going on), then I or the person in question could also backport this to DB.