return NULL;
}
while ( $row = $this->fetchObject( $res ) ) {
- if ( $row->indexname == $index ) {
+ if ( $row->indexname == $this->indexName( $index ) ) {
return $row;
}
}
function indexUnique ($table, $index, $fname = 'Database::indexUnique' ) {
$sql = "SELECT indexname FROM pg_indexes WHERE tablename='{$table}'".
" AND indexdef LIKE 'CREATE UNIQUE%(" .
- $this->strencode( $index ) .
+ $this->strencode( $this->indexName( $index ) ) .
")'";
$res = $this->query( $sql, $fname );
if ( !$res )