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

Bug #11694 schema validation error: "'0'::character varying"
Submitted: 2007-07-27 05:55 UTC
From: floele Assigned: quipo
Status: Closed Package: MDB2
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2007-07-27 05:55 UTC] floele (Florian Schmitz)
Description: ------------ Hi again ;) Full error message of $schema->getDefinitionFromDatabase(): MDB2_Schema Error: schema validation error: default value of "theme_style" is incorrect: "'0'::character varying" is larger than "20" happens on the table CREATE TABLE flyspray_projects ( project_id serial NOT NULL, project_title character varying(100) NOT NULL, theme_style character varying(20) NOT NULL DEFAULT '0'::character varying, default_cat_owner integer NOT NULL DEFAULT 0, ... default_entry character varying(8) NOT NULL DEFAULT 'index'::character varying, CONSTRAINT flyspray_projects_pkey PRIMARY KEY (project_id) ) WITHOUT OIDS; ALTER TABLE flyspray_projects OWNER TO root; on PostgreSQL. So it looks like MDB2_Schema does not remove the type convertor or whatever this is from the default value. Expected result: ---------------- "0" is read as default value. Actual result: -------------- "'0'::character varying" is read as default value.

Comments

 [2007-07-27 13:39 UTC] ifeghali (Igor Feghali)
Hi Florian, As this is a issue from a particular database, I think it should be handled by the MDB2 driver instead. This should be transparent to MDB2_Schema when calling getTableFieldDefinition method of pgsql reverse driver. regards, iGor.
 [2007-08-03 20:56 UTC] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.