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

Bug #13112 module Revers does not know type timestamptz from PostgreSQL
Submitted: 2008-02-13 04:36 UTC
From: negram Assigned: quipo
Status: Closed Package: MDB2 (version 2.4.1)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    

 [2008-02-13 04:36 UTC] negram (Galanin Michail)
Description: ------------ i have a table: CREATE TABLE "polar"."ankets" ( "id" SERIAL, "created" TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL, ) WITH OIDS; timestamptz is valid PosgreSQL type and described on Test script: --------------- $mdb2 = &MDB2::connect($dsn); if(PEAR::isError($mdb2)) { die($mdb2->getuserinfo()); } $mdb2->loadModule('Reverse', null, true); $mdb2->query('SET search_path = polar, pg_catalog'); $tableInfo = $mdb2->tableInfo($tname, MDB2_TABLEINFO_FULL); if (PEAR::isError($tableInfo)) { die($tableInfo->toString()); } Expected result: ---------------- [mdb2_error: message="MDB2 Error: not supported" code=-6 mode=return level=notice prefix="" info="_mapNativeDatatype: [Error message: unknown database attribute type: timestamptz] [Last executed query: SELECT a.attname AS name, t.typname AS type, CASE a.attlen WHEN -1 THEN CASE t.typname WHEN 'numeric' THEN (a.atttypmod / 65536) WHEN 'decimal' THEN (a.atttypmod / 65536) WHEN 'money' THEN (a.atttypmod / 65536) ELSE CASE a.atttypmod WHEN -1 THEN NULL ELSE a.atttypmod - 4 END END ELSE a.attlen END AS length, CASE t.typname WHEN 'numeric' THEN (a.atttypmod % 65536) - 4 WHEN 'decimal' THEN (a.atttypmod % 65536) - 4 WHEN 'money' THEN (a.atttypmod % 65536) - 4 ELSE 0 END AS scale, a.attnotnull, a.atttypmod, a.atthasdef, (SELECT substring(pg_get_expr(d.adbin, d.adrelid) for 128) FROM pg_attrdef d WHERE d.adrelid = a.attrelid AND d.adnum = a.attnum AND a.atthasdef ) as default FROM pg_attribute a, pg_class c, pg_type t WHERE c.relname = 'ankets' AND a.atttypid = t.oid AND c.oid = a.attrelid AND NOT a.attisdropped AND a.attnum > 0 AND a.attname = 'modified' ORDER BY a.attnum]


 [2008-02-13 17:31 UTC] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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.