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

Bug #730 PostgreSQL 'double precision' type is handled incorrectly
Submitted: 2004-02-11 00:23 UTC
From: ieure at php dot net Assigned: alan_k
Status: Closed Package: DB_DataObject
PHP Version: 4.2.2 OS: Linux
Roadmaps: (Not assigned)    

 [2004-02-11 00:23 UTC] ieure at php dot net
Description: ------------ DB_DataObject ignores PostgreSQL 'double precision' fields. It incorrectly flags them as MySQL 'timestamp' fields. This is with DB_DataObject 1.5.3. I regenerated the structure INI file with this version to make sure it was consistent with what this version of DB_DO outputs. Reproduce code: --------------- table structure: Table "table" Column | Type | Modifiers --------------+--------------------------+------------------------------------------------------ id | integer | not null default nextval('"table_id_seq"'::text) price | double precision | not null $o = &DB_DataObject::factory('Table'); $o->price = 1.99; $o->insert(); Expected result: ---------------- The 'price' column in 'Table' should be set to 1.99. Actual result: -------------- The 'price' column is not set; the type (from the INI file) is '257,' which is the MySQL TIMESTAMP type, and the field is ignored. A PostgreSQL error then occurs, as the field may not be NULL.


 [2004-02-11 05:13 UTC] alan_k
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on In case this was a website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. thanks - have added float8 Regards Alan