Re: Don't treate IndexStmt like AlterTable when DefineIndex is called from ProcessUtilitySlow. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Don't treate IndexStmt like AlterTable when DefineIndex is called from ProcessUtilitySlow.
Date
Msg-id 2053950.1668724012@sss.pgh.pa.us
Whole thread Raw
In response to Don't treate IndexStmt like AlterTable when DefineIndex is called from ProcessUtilitySlow.  (正华吕 <kainwen@gmail.com>)
Responses Re: Don't treate IndexStmt like AlterTable when DefineIndex is called from ProcessUtilitySlow.
List pgsql-hackers
=?UTF-8?B?5q2j5Y2O5ZCV?= <kainwen@gmail.com> writes:
>   Recently read the code, I find that when calling DefineIndex
>   from ProcessUtilitySlow, is_alter_table will be set true if
>   this statement is came from expandTableLikeClause.

Yeah.

>   Based on the above, I think  we can always a false value
>   for is_alter_table when DefineIndex is called from
>   ProcessUtilitySlow.

Why do you think this is an improvement?  Even if it's correct,
the code savings is so negligible that I'm not sure I want to
expend brain cells on figuring out whether it's correct.  The
comment you want to remove does not suggest that it's optional
which value we should pass, so I think the burden of proof
is to show that this patch is okay not that somebody else
has to demonstrate that it isn't.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: allow segment size to be set to < 1GiB
Next
From: Thomas Munro
Date:
Subject: Re: Strange failure on mamba