Re: silence compiler warning in brin.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: silence compiler warning in brin.c
Date: 2022-06-01 17:55:52
Message-ID: 635071.1654106152@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zhihong Yu <zyu(at)yugabyte(dot)com> writes:
> Hi,

> if (heapRel == NULL || heapoid != IndexGetRelation(indexoid, false))
> ereport(ERROR,

> I wonder why the above check is not placed in the else block:

> else
> heapRel = NULL;

Because we don't want to throw that error until we've exhausted the
possibilities for throwing other errors.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2022-06-01 17:57:36 Re: Handle infinite recursion in logical replication setup
Previous Message vignesh C 2022-06-01 17:55:02 Re: Handle infinite recursion in logical replication setup