mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-09 08:10:09 +08:00
Fix for new pg_upgrade cache code.
This commit is contained in:
parent
333b4a45f1
commit
1c72614be7
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user