Commit b87d9961 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Check for valid columns in adodb postgres64 driver MetaIndexes fn (bug #796102)

Indexes on functions of columns have a 0 in the indkey column of
pg_catalog.pg_index, which doesn't refer to a column.

Don't return any columns for the index, rather than returning an empty
column name.

Change-Id: I1464b8a9fda8bd137dcabf1145da289ccf32c500
Signed-off-by: default avatarRichard Mansfield <>
parent d99780a8
......@@ -9,3 +9,5 @@ Modifications:
- drivers/ (24465d23e2ccb3a89629e250a3caab1ee051e90d)
- drivers/ (af59ab96086a319785ed682420d22dbfcbacb9bc)
- adodb/drivers/ (d6d8884fabc598aec58e633a6a1e258cd07b3da1)
- Add check for valid columns in MetaIndexes function of
adodb/drivers/ (see bug #796102)
......@@ -633,7 +633,9 @@ WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\'))';
while ($row = $rs->FetchRow()) {
$columns = array();
foreach (explode(' ', $row[2]) as $col) {
if (isset($col_names[$col])) {
$columns[] = $col_names[$col];
$indexes[$row[0]] = array(
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment