pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kirill Reshke <reshkekirill@gmail.com>
Cc: jian he <jian.universality@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt
Date: Thu, 21 Aug 2025 11:27:59 -0400
Message-ID: <1440197.1755790079@sss.pgh.pa.us> (raw)
In-Reply-To: <CALdSSPiZtCRJhe=KdPKEmeYNZQe_yhQKVn3QCsfrCiNdOCTP0A@mail.gmail.com>
References: <CACJufxEZ48toGH0Em_6vdsT57Y3L8pLF=DZCQ_gCii6=C3MeXw@mail.gmail.com>
	<CALdSSPiZtCRJhe=KdPKEmeYNZQe_yhQKVn3QCsfrCiNdOCTP0A@mail.gmail.com>

Kirill Reshke <reshkekirill@gmail.com> writes:
> On Thu, 21 Aug 2025 at 17:00, jian he <jian.universality@gmail.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





view thread (33+ messages)  latest in thread

Message-ID: <1440197.1755790079@sss.pgh.pa.us>
Permalink:  ../1440197.1755790079@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1440197.1755790079@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, reshkekirill@gmail.com, jian.universality@gmail.com
  Subject: Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt
  In-Reply-To: <1440197.1755790079@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