Re: redundant check of msg in does_not_exist_skipping

From: Li Japin <japinli(at)hotmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ted Yu <yuzhihong(at)gmail(dot)com>, "peter(at)eisentraut(dot)org" <peter(at)eisentraut(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: redundant check of msg in does_not_exist_skipping
Date: 2022-11-18 00:10:25
Message-ID: 1B510A10-1704-4302-AA07-6616B841C43D@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Nov 18, 2022, at 4:04 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Thu, Nov 17, 2022 at 10:56 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> This is a completely bad idea. If it takes that level of analysis
>> to see that msg can't be null, we should leave the test in place.
>> Any future modification of either this code or what it calls could
>> break the conclusion.
>
> +1. Also, even if the check were quite obviously useless, it's cheap
> insurance. It's difficult to believe that it hurts performance in any
> measurable way. If anything, we would benefit from having more sanity
> checks in our code, rather than fewer.
>

Thanks for the explanation! Got it.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-11-18 00:23:56 Re: Mingw task for Cirrus CI
Previous Message 正华吕 2022-11-17 23:31:18 Re: Don't treate IndexStmt like AlterTable when DefineIndex is called from ProcessUtilitySlow.