Re: Simplify newNode()

Zhang Mingli <zmlpostgres@gmail.com>

From: Zhang Mingli <zmlpostgres@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>, Heikki Linnakangas <hlinnaka@iki.fi>
Date: 2023-12-14T01:34:26Z
Lists: pgsql-hackers
Hi,

LGTM.

+	Assert(size >= sizeof(Node));	/* need the tag, at least */
+	result = (Node *) palloc0fast(size);
+	result->type = tag;

+	return result;
+}

How about moving the comments /* need the tag, at least */ after result->type = tag; by the way?



Zhang Mingli
www.hashdata.xyz

Commits

  1. Simplify newNode() by removing special cases