Re: silence compiler warning in brin.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: silence compiler warning in brin.c
Date
Msg-id 635071.1654106152@sss.pgh.pa.us
Whole thread Raw
In response to Re: silence compiler warning in brin.c  (Zhihong Yu <zyu@yugabyte.com>)
List pgsql-hackers
Zhihong Yu <zyu@yugabyte.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



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Handle infinite recursion in logical replication setup
Next
From: vignesh C
Date:
Subject: Re: Handle infinite recursion in logical replication setup