Re: Using DataObject with Posgres

From: Date: Sat, 01 Nov 2003 05:27:27 +0000
Subject: Re: Using DataObject with Posgres
References: 1  Groups: php.pear.general php.pear.general 
Request: Send a blank email to pear-general+get-8704@lists.php.net to get a copy of this message
It's a bug in the php postgres extension, which doesnt report that information.... - AFAIR it can be worked around using a long weird query.. copied from pgaccess or something. Regards Alan Demian Turner wrote:
Hi I've been porting mysql code to posgres and it's worked without any hitches as far as DataObject is concerned. Just two questions: 1. using the latest DO, when I generate the entity classes from MySQL I get the following:
    var $id;                              // int(5)  not_null primary_key
    var $date_created;                    // datetime(19)  not_null
    var $last_updated;                    // datetime(19)  not_null
    var $gid;                             // int(5)  not_null
    var $username;                        // string(64)  not_null
    var $password;                        // string(16)  not_null
however the same schema on postgres gives:
    var $id;                              // int4(4)  not_null unique primary
    var $date_created;                    // timestamp(8)
    var $last_updated;                    // timestamp(8)
    var $gid;                             // int4(4)
    var $username;                        // varchar(-1)
    var $password;                        // varchar(-1)
The problem is the varchars, every single one of them comes out as -1. Is this a user error or perhaps a DO bug? 2. I've also ran my postgres app on DO entities generated from mysql and it worked fine, is this expected? PHP 4.3.2 MySQL 4.0.12 Postgres 7.2.1 Platform windows cheers Demian
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.pear.general (#8704) next »