mirror of
https://github.com/postgres/postgres.git
synced 2026-10-31 05:54:36 +03:00
Move some node-read support functions from nodes.h to readfuncs.h
The functions moved in this commit have been exposed since c1ddd2361f,
and there still seem to be a couple of projects out there that require
them, as they can be more efficient than nodeRead(). Note that all
these functions are only called in readfuncs.c in terms of the core
code.
A follow-up patch plans to improve the in-core support of pg_strtok(),
making it thread-safe. This change removes the need to expose internals
specific to node reads in nodes.h, which is a header with a more general
purpose than readfuncs.h.
Based on a suggestion by me.
Author: Matthias van de Meent <boekewurm+postgres@gmail.com>
Discussion: https://postgr.es/m/aofW6ntfWJjk_yBL@paquier.xyz
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user