From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
Cc: | jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt |
Date: | 2025-08-21 15:27:59 |
Message-ID: | 1440197.1755790079@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Kirill Reshke <reshkekirill(at)gmail(dot)com> writes:
> On Thu, 21 Aug 2025 at 17:00, jian he <jian(dot)universality(at)gmail(dot)com> wrote:
>> RangeVar *rel = (RangeVar *) linitial(stmt->relations);
>> if (!IsA(rel, RangeVar))
> These two lines are weird. Looks like linitial(stmt->relations)
> should be assigned to variable with type Node* first?
We take that sort of shortcut in many places. If there's not any need
for the code to deal with more than one node type, an extra variable
that's used just for the IsA test seems like a lot of notational
overhead.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Corey Huinker | 2025-08-21 15:29:56 | Re: Don't treat virtual generated columns as missing statistics in vacuumdb --missing-stats-only |
Previous Message | Kirill Reshke | 2025-08-21 15:20:52 | Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt |