Re: dataobjects: postgresql createtables error
| From: | Jeroen Houben | Date: | Mon, 24 Jan 2005 10:37:29 +0000 |
| Subject: | Re: dataobjects: postgresql createtables error | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17125@lists.php.net to get a copy of this message | ||
Sorry, I should have found this bug report before posting: http://pear.php.net/bugs/bug.php?id=3109
Jeroen
Jeroen Houben wrote:
Hi, When running createtables.php on my postgresql 7.4 database I get the following error: [jeroen@respect config]$ php /usr/local/share/php/pear/DB/DataObject/createTables.php DataObjects_comp05.iniDB_DataObject_Generator : 0 : CREATING FOR compendium2005PHP Notice: Trying to get property of non-object in /usr/local/share/php/pear/DB/pgsql.php on line 729 Notice: Trying to get property of non-object in /usr/local/share/php/pear/DB/pgsql.php on line 729 [db_error: message="DB Error: insufficient data supplied" code=-20 mode=return level=notice prefix="" info="SELECT c.relname as "Name"FROM pg_class c, pg_user u WHERE c.relowner = u.usesysid AND c.relkind = 'r' AND not exists (select 1 from pg_views where viewname = c.relname) AND c.relname !~ '^(pg_|sql_)' UNION SELECT c.relname as "Name" FROM pg_class c WHERE c.relkind = 'r' AND not exists (select 1 from pg_views where viewname = c.relname) AND not exists (select 1 from pg_user where usesysid = c.relowner) AND c.relname !~ '^pg_'"]Pasting the above query in a shell works fine and lists all the tables. Here's my INI file: [DB_DataObject]database = pgsql://postgres:XXXXX@localhost/compendium2005 ; the default database dsn see pear spec for more detailsschema_location = XXX;directory where the database ini files are..class_location = XXX; directory where the Table classes are..require_prefix = DataObjects/; prefix for the 'require statement'class_prefix = DataObjects_ ; Prefix Mapping of table name to PHP Class; the generator settings (optional)extends_location = ; string added to php file for 'include('DB/DataObject');' ; usefull if you want to add an extra layer - eg. a table level auth scheme.. ; optional :: default = DB/DataObject.phpextends = ; string used in Table_XXX extends YYYY { ; usefull if you want to add an extra layer - eg. a table level auth scheme.. ; optional :: default = DB_DataObjectdebug = 1; default debugging levelproduction = 0; this disables all debugging (so you cant set it run time), and should ; improve performaceAny ideas? Jeroen