Re: Don't treate IndexStmt like AlterTable when DefineIndex is called from ProcessUtilitySlow.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 正华吕 <kainwen(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Don't treate IndexStmt like AlterTable when DefineIndex is called from ProcessUtilitySlow.
Date: 2022-11-17 22:26:52
Message-ID: 2053950.1668724012@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?UTF-8?B?5q2j5Y2O5ZCV?= <kainwen(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2022-11-17 22:35:10 Re: Strange failure on mamba
Previous Message Andrew Dunstan 2022-11-17 22:24:04 Re: allow segment size to be set to < 1GiB