Commit f4ab7790 authored by Robert Lyon's avatar Robert Lyon

Check for valid columns in adodb postgres64 driver MetaIndexes fn

Bug 1539346

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.

(cherry picked from commit b87d9961)

Change-Id: I9854b99d4937b3fea1ebb44e3abed2e64446afdb
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent c81a1e1c
......@@ -8,5 +8,6 @@ Modifications:
- RecordSet_postgres7->MoveNext() - remove expensive is_array() (04ef8a3b9770f93326a2ece31e4089368117faca)
- check for Postgres 8.1 (c6dfccadfae432147fff99fa15b0985dcae7e503)
- Check for valid columns in adodb postgres64 driver MetaIndexes fn (b87d9961020a8d52a2eaf709a9197520b3c6b65b)
- Deleted many files we're not using, including tests, docs, other drivers, other error langs
......@@ -669,7 +669,9 @@ class ADODB_postgres64 extends ADOConnection{
while ($row = $rs->FetchRow()) {
$columns = array();
foreach (explode(' ', $row[2]) as $col) {
$columns[] = $col_names[$col];
if (isset($col_names[$col])) {
$columns[] = $col_names[$col];
}
}
$indexes[$row[0]] = array(
......
Markdown is supported
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