Skip to content

an issue about NodeTag definition. #138

@liujinyang-highgo

Description

@liujinyang-highgo

hi,
Now, struct NodeTag in nodes.h as below:
typedef enum NodeTag
{
T_Invalid = 0,

/* pgpool Extension */
			T_PgpoolVariableSetStmt,
			T_PgpoolVariableShowStmt,
			T_PgpoolQueryCacheStmt,

#include "nodetags.h"
} NodeTag;

The content of nodetags.h as below:
T_List = 1,
T_Alias = 2,
T_RangeVar = 3,
T_TableFunc = 4,
T_IntoClause = 5,
T_Var = 6,
T_Const = 7,
....
....

I think that will cause T_PgpoolVariableSetStmt and T_List has same value is 1, is there any potential risk?
I think the right definition should as below, please help clarify it, thanks a lot!
typedef enum NodeTag
{
T_Invalid = 0,
#include "nodetags.h"
/* pgpool Extension */
T_PgpoolVariableSetStmt,
T_PgpoolVariableShowStmt,
T_PgpoolQueryCacheStmt,
} NodeTag;

Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions