pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: silence compiler warning in brin.c
Date: Wed, 01 Jun 2022 13:55:52 -0400
Message-ID: <635071.1654106152@sss.pgh.pa.us> (raw)
In-Reply-To: <CALNJ-vSfwr_vCiiSYVNmh8bH1ejyb4E06oczTcvARhz8wAxu0g@mail.gmail.com>
References: <20220601163537.GA2331988@nathanxps13>
	<CALNJ-vTvL-kvQ0CAbZxOvSR=PuOi1MbtywE=tdG2hhqSnZVkRw@mail.gmail.com>
	<626379.1654103181@sss.pgh.pa.us>
	<CALNJ-vSfwr_vCiiSYVNmh8bH1ejyb4E06oczTcvARhz8wAxu0g@mail.gmail.com>

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





view thread (8+ messages)  latest in thread

Message-ID: <635071.1654106152@sss.pgh.pa.us>
Permalink:  ../635071.1654106152@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/635071.1654106152@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, zyu@yugabyte.com, nathandbossart@gmail.com
  Subject: Re: silence compiler warning in brin.c
  In-Reply-To: <635071.1654106152@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox