continue; /* not an owned sequence */
owning_tab = findTableByOid(seqinfo->owning_tab);
+ if (owning_tab == NULL)
+ exit_horribly(NULL, "failed sanity check, parent table OID %u of sequence OID %u not found\n",
+ seqinfo->owning_tab, seqinfo->dobj.catId.oid);
/*
* We need to dump the components that are being dumped for the table
{
TableInfo *owning_tab = findTableByOid(tbinfo->owning_tab);
- if (owning_tab && owning_tab->dobj.dump & DUMP_COMPONENT_DEFINITION)
+ if (owning_tab == NULL)
+ exit_horribly(NULL, "failed sanity check, parent table OID %u of sequence OID %u not found\n",
+ tbinfo->owning_tab, tbinfo->dobj.catId.oid);
+
+ if (owning_tab->dobj.dump & DUMP_COMPONENT_DEFINITION)
{
resetPQExpBuffer(query);
appendPQExpBuffer(query, "ALTER SEQUENCE %s",