Ok, I figured it out. The code in db_all is not valid.
function db_all($q)
{
if (function_exists('pg_fetch_all_columns')) {
return pg_fetch_all_columns(q($q));
}
if (!($r = pg_fetch_all(q($q)))) {
return array();
}
$f = array();
foreach ($r as $v) {
$f[] = $v[0];
}
return $f;
}
The problem is that pg_fetch_all returns a hash indexed on field name instead of a regular array. So the assignment
fail in the case of the consistency query. In that case it should be
After changing this my consistency check runs to completion.
I guess this means that all uses of db_all are broken right now. Was this changed in this release? (related, is there an online CVS browser somewhere?)