Re: DB_DataObjects - PostgreSQL view error + ini

From: Date: Wed, 17 Nov 2004 01:01:09 +0000
Subject: Re: DB_DataObjects - PostgreSQL view error + ini
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15583@lists.php.net to get a copy of this message
You probably need to run this on the postgres server. - and if it doesnt work SELECT viewname FROM pg_views a) check the postgres docs b) contact the postgres help mailing list. that said, the generator should check the return value from ->getListOf('views'); Could you file that as a bug. Regards Alan Fabio Fioravanti wrote:
Hi! I tried to run createtables.php to create classes with: build_views = true And error is returned:
db_dataobject_generator   : CONNECT       : NEW CONNECTION
db_dataobject_generator   : CONNECT       :
pgsql://user:pass@localhost/ostmart dac19c38c583a22259d25ae029c38d65 [db_error: message="DB Error: insufficient data supplied" code=-20
mode=return
level=notice prefix="" info="SELECT viewname FROM pg_views
[nativecode=ERROR:
no existe la relaci?n "table_constraints"]"]sh-2.05b$ I have instaled the last stable packages DB, DB_DataObjects and run on PostgreSQL 7.4.6 & php 4.3.9
I'm experiencing a similar problem: I get the following error msg [db_error: message="DB Error: insufficient data supplied" code=-20 mode=return level=notice prefix="" info="SELECT viewname FROM pg_views [nativecode=ERROR: relation "view_column_usage" does not exist]"] moreover I'm also experiencing problems with config options parsing: although I've put build_views = true in my .ini config file, it does not get parsed: indeed print_r says [DB_DataObject] => Array ( [database] => pgsql://postgres:postgres@localhost/koiffeur [schema_location] => C:\\Program Files\\Apache Group\\Apache\\htdocs \\koiffeur-pear [links_koiffeur] => C:\\Program Files\\Apache Group\\Apache\\htdocs\ \koiffeur-pear\koiffeur_links.ini [class_location] => C:\\Program Files\\Apache Group\\Apache\\htdocs\ \koiffeur-pear\DataObjects [require_prefix] => DataObjects/ [class_prefix] => [build_views] => 0 [extends_location] => [extends] => [generator_class_rewrite] => [debug] => 0 [debug_ignore_updates] => 0 [dont_die] => 0 [dont_use_pear_sequences] => 0 ) Notice that I get this strange behavior also with other config options (e.g. clientRules)!!!! So I decided to comment out the following code in Generator.php
        // build views as well if asked to.
        //if (!empty($options['build_views'])) {
            $this->tables = array_merge ($this->tables,
$__DB->getListOf('views'));
        //}
but I get the errors reported above!!! I'm using PHP Version 4.3.2 + Apache/1.3.24 + PostgreSQL 8.0.0 beta-dev1 on windows XP sp2 (bleah) thanks in advance, Fabio


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