@@ -79,10 +79,10 @@ def parse_plpgsql(statement):
79
79
as_sql = parse_sql(STMT)
80
80
pprint([stmt(skip_none=True) for stmt in as_sql])
81
81
82
- you obtain a richer representation of the statement:
82
+ you obtain a richer representation\\ [#]_ of the statement:
83
83
84
84
.. testoutput::
85
- :options: - ELLIPSIS
85
+ :options: + ELLIPSIS
86
86
87
87
[{'@': 'RawStmt',
88
88
'stmt': {'@': 'CreateFunctionStmt',
@@ -95,17 +95,17 @@ def parse_plpgsql(statement):
95
95
'name': 'DEFELEM_UNSPEC',
96
96
'value': 0},
97
97
'defname': 'as',
98
- 'location': 68 },
98
+ 'location': ... },
99
99
{'@': 'DefElem',
100
100
'arg': {'@': 'String', 'sval': 'plpgsql'},
101
101
'defaction': {'#': 'DefElemAction',
102
102
'name': 'DEFELEM_UNSPEC',
103
103
'value': 0},
104
104
'defname': 'language',
105
- 'location': 104 }),
105
+ 'location': ... }),
106
106
'parameters': ({'@': 'FunctionParameter',
107
107
'argType': {'@': 'TypeName',
108
- 'location': 32 ,
108
+ 'location': ... ,
109
109
'names': ({'@': 'String',
110
110
'sval': 'pg_catalog'},
111
111
{'@': 'String',
@@ -119,7 +119,7 @@ def parse_plpgsql(statement):
119
119
'name': 'a'},
120
120
{'@': 'FunctionParameter',
121
121
'argType': {'@': 'TypeName',
122
- 'location': 43 ,
122
+ 'location': ... ,
123
123
'names': ({'@': 'String',
124
124
'sval': 'pg_catalog'},
125
125
{'@': 'String',
@@ -133,7 +133,7 @@ def parse_plpgsql(statement):
133
133
'name': 'b'}),
134
134
'replace': False,
135
135
'returnType': {'@': 'TypeName',
136
- 'location': 60 ,
136
+ 'location': ... ,
137
137
'names': ({'@': 'String', 'sval': 'pg_catalog'},
138
138
{'@': 'String', 'sval': 'int4'}),
139
139
'pct_type': False,
@@ -143,6 +143,7 @@ def parse_plpgsql(statement):
143
143
'stmt_location': 0}]
144
144
145
145
.. [#] See also https://github.com/pganalyze/libpg_query/issues/110.
146
+ .. [#] ``location`` values has been masqueraded for test purposes.
146
147
"""
147
148
148
149
from json import loads
0 commit comments