Re: Re: MDB_QueryTool 1.1.1 does not work with MDB2 2.2.0 (Driver_pgsql 1.2.0)
| From: | Lukas Ruetz | Date: | Wed, 26 Jul 2006 09:54:41 +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 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24772@lists.php.net to get a copy of this message | ||
Am Mittwoch, 26. Juli 2006 01:18 schrieb Lukas Smith:
> Lukas Ruetz wrote:
> > Hello all, hi Lorenzo!
> >
> > With MDB2 (2.2.0) and MDB2_Driver_pgsql (1.2.0) using postgres 8.1.3
> > I have the problem that the select-columns are missing in the query, like
> > "SELECT FROM mytab" resulting from a getAll() call.
> >
> > If I move back to MDB 2.1.0 with Driver_pgsql 1.1.0, it works.
> >
> > I guess it has something to do with retrieving the columns from the
> > table-info? somewhere in _buildSelect() .. metadata()?
>
> This is probably related to this bug:
> http://pear.php.net/bugs/bug.php?id=8289
>
> Its fixed in CVS. Could you please try it out?
Hi Lukas!
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 ..
thanks
lukas