Re: DB_DataObject with PostgreSQL Schemas

From: Date: Thu, 05 Feb 2004 03:14:25 +0000
Subject: Re: DB_DataObject with PostgreSQL Schemas
References: 1  Groups: php.pear.general php.pear.general 
Request: Send a blank email to pear-general+get-10515@lists.php.net to get a copy of this message
It uses pear's db layer to find the table names, since that doesnt return the schema names It doesnt know anything about it... I've not dealt with postgres schema's before.. but if you want to try modifying the code in DB/pgsql.php to return schemas from getListOf('tables') .. or add an extra case to it.. getListOf('schema.tables') and see where to go from there.. I think it may have to be a generator option - as it would break BC hugely on databases without schemas (eg. the classname et al would be totally different) Regards Alan Mark Mitchenall wrote:
Hi, I'm having a great time using DB_DataObject, but I have one question with regard to PostgreSQL schemas. I've been using the createTables.php script to auto-build the dataobject subclasses I need, but this function doesn't take the schemas into account, so with a database which has the following tables... public.table1 public.table2 nonpublic.table3 ... I get three subclasses which just have the table name and don't include the schema name, both in the filename and the $__table property. This doesn't seem to be a huge problem on the whole, but it would be nice if it was included and I wondered if anyone else had views on this. For example, should I be worried about this, or am I just being silly? And if I should be worried about it, should I just modify the autobuild code by hand to include the schema name. It's late and I've been coding too long today so I'm worried I'm not thinking far enough ahead. TIA for any consideration... Best, Mark
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

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