Commit 1c72614b authored by Bruce Momjian's avatar Bruce Momjian

Fix for new pg_upgrade cache code.

parent 333b4a45
......@@ -429,7 +429,8 @@ relarr_lookup_rel(RelInfoArr *rel_arr,
return NULL;
/* Test most recent lookup first, for speed */
if (strcmp(rel_arr->rels[relnum].nspname, nspname) == 0 &&
if (relnum < rel_arr->nrels &&
strcmp(rel_arr->rels[relnum].nspname, nspname) == 0 &&
strcmp(rel_arr->rels[relnum].relname, relname) == 0)
return &rel_arr->rels[relnum];
......
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