Skip to content

Commit

Permalink
srcdata/nodetypes.json: Don't parse bogus values inside comments (#94)
Browse files Browse the repository at this point in the history
Fixes #69
  • Loading branch information
lfittl authored Mar 30, 2021
1 parent c7c39b2 commit 1c33b77
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions scripts/extract_headers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def generate_nodetypes!
lines = File.read(File.join(@pgdir, '/src/include/nodes/nodes.h'))
lines.each_line do |line|
if inside
if line[/([A-z_]+)(\s+=\s+\d+)?,/]
@nodetypes << $1[2..-1] # Without T_ prefix
if line[/T_([A-z_]+)(\s+=\s+\d+)?,/]
@nodetypes << $1
elsif line == "} NodeTag;\n"
inside = false
end
Expand Down
4 changes: 0 additions & 4 deletions srcdata/nodetypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@
"FromExpr",
"OnConflictExpr",
"IntoClause",
"de",
"ecutor",
"grefExprState",
"ExprState",
"AggrefExprState",
"WindowFuncExprState",
Expand Down Expand Up @@ -407,7 +404,6 @@
"StartReplicationCmd",
"TimeLineHistoryCmd",
"SQLCmd",
"ructures",
"TriggerData",
"EventTriggerData",
"ReturnSetInfo",
Expand Down
5 changes: 5 additions & 0 deletions srcdata/struct_defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,11 @@
"name": "options",
"c_type": "bits32",
"comment": "/* OR of TableLikeOption flags */"
},
{
"name": "relationOid",
"c_type": "Oid",
"comment": "/* If table has been looked up, its OID */"
}
],
"comment": "/*\n * TableLikeClause - CREATE TABLE ( ... LIKE ... ) clause\n */\n"
Expand Down

0 comments on commit 1c33b77

Please sign in to comment.