Re: Re: MDB_QueryTool 1.1.1 does not work with MDB2 2.2.0 (Driver_pgsql 1.2.0)

From: Date: Wed, 26 Jul 2006 09:55:49 +0000
Subject: Re: Re: MDB_QueryTool 1.1.1 does not work with MDB2 2.2.0 (Driver_pgsql 1.2.0)
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24773@lists.php.net to get a copy of this message
Lukas Ruetz wrote:
Now I tried with MDB2 and QueryTool from CVS, but the problem is the same. I was looking at the code now for a long time and found the failing statement, although it's clear that this is not the real problem, only a symptom. The problem has to be somewhere in MDB2/Driver/Reverse/pgsql.php tableInfo() or subcalls. My symtom now is that a wrong index-name is used in MDB2_Driver_Reverse_pgsql in getTableIndexDefinition($result, $index); The index-name is wrong and so the query for the index is failing. '_idx' gets appended by MDB2->getIndexName() to the real index-name 'users_us_id_key_idx' which doesn't exist (should be 'users_us_id_key') and what causes this error message. If I comment out the both calls to $db->getIndexName($index_name) everything works. But obviously those getIndexName()-calls are also present in MDB-2.1.0 so the error has to be somewhere else. Maybe you could look at it ..
This is one of those "obscure" portability options that can safe your ass in a project, but requires that you use MDB2 to create your indexes to begin with . To disable it you need to set an option: $mdb2->setOption('idxname_format', '%s'); regards, Lukas

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