From ee0936741f93c5f33bacf5f48470bcbae2eb25f6 Mon Sep 17 00:00:00 2001
From: Matthias van de Meent <boekewurm+postgres@gmail.com>
Date: Sat, 22 Aug 2026 20:48:39 +0200
Subject: [PATCH v4 1/2] Refactor: Move read* functions to readfuncs.h

This removes the need to expose new Node read internals in the
general node.h infrastructure in later commits;  it'll be contained to
readfuncs.h only.

Suggested-by: Michael Paquier <michael@paquier.xyz>
---
 src/include/nodes/nodes.h     | 8 +-------
 src/include/nodes/readfuncs.h | 6 ++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 372eee20680..e6fe8577997 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -205,18 +205,12 @@ extern char *nodeToStringWithLocations(const void *obj);
 extern char *bmsToString(const struct Bitmapset *bms);
 
 /*
- * nodes/{readfuncs.c,read.c}
+ * nodes/read.c
  */
 extern void *stringToNode(const char *str);
 #ifdef DEBUG_NODE_TESTS_ENABLED
 extern void *stringToNodeWithLocations(const char *str);
 #endif
-extern struct Bitmapset *readBitmapset(void);
-extern Datum readDatum(bool typbyval);
-extern bool *readBoolCols(int numCols);
-extern int *readIntCols(int numCols);
-extern Oid *readOidCols(int numCols);
-extern int16 *readAttrNumberCols(int numCols);
 
 /*
  * nodes/copyfuncs.c
diff --git a/src/include/nodes/readfuncs.h b/src/include/nodes/readfuncs.h
index 0a5abdd9691..8ee2ddcd5c8 100644
--- a/src/include/nodes/readfuncs.h
+++ b/src/include/nodes/readfuncs.h
@@ -34,5 +34,11 @@ extern void *nodeRead(const char *token, int tok_len);
  * prototypes for functions in readfuncs.c
  */
 extern Node *parseNodeString(void);
+extern struct Bitmapset *readBitmapset(void);
+extern Datum readDatum(bool typbyval);
+extern bool *readBoolCols(int numCols);
+extern int *readIntCols(int numCols);
+extern Oid *readOidCols(int numCols);
+extern int16 *readAttrNumberCols(int numCols);
 
 #endif							/* READFUNCS_H */
-- 
2.50.1 (Apple Git-155)

