diff options
| author | Tom Lane | 2008-09-01 20:42:46 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-09-01 20:42:46 +0000 |
| commit | 68b3ec1db4baa5060c4ed4d114f8f60e7c8faa33 (patch) | |
| tree | 67127a58e8ae093ea5e302fd3cd97306ae837368 /src/backend/nodes/nodeFuncs.c | |
| parent | 8a2619fcd973e213a7cfbb72b8b802d00a54eb5a (diff) | |
Add a bunch of new error location reports to parse-analysis error messages.
There are still some weak spots around JOIN USING and relation alias lists,
but most errors reported within backend/parser/ now have locations.
Diffstat (limited to 'src/backend/nodes/nodeFuncs.c')
| -rw-r--r-- | src/backend/nodes/nodeFuncs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c index ed24ae95d2..60ad41e730 100644 --- a/src/backend/nodes/nodeFuncs.c +++ b/src/backend/nodes/nodeFuncs.c @@ -613,6 +613,9 @@ exprLocation(Node *expr) return -1; switch (nodeTag(expr)) { + case T_RangeVar: + loc = ((RangeVar *) expr)->location; + break; case T_Var: loc = ((Var *) expr)->location; break; @@ -789,6 +792,10 @@ exprLocation(Node *expr) /* just use argument's location */ loc = exprLocation((Node *) ((TargetEntry *) expr)->expr); break; + case T_IntoClause: + /* use the contained RangeVar's location --- close enough */ + loc = exprLocation((Node *) ((IntoClause *) expr)->rel); + break; case T_List: { /* report location of first list member that has a location */ @@ -852,6 +859,10 @@ exprLocation(Node *expr) loc = leftmostLoc(loc, tc->location); } break; + case T_SortBy: + /* just use argument's location (ignore operator, if any) */ + loc = exprLocation(((SortBy *) expr)->node); + break; case T_TypeName: loc = ((TypeName *) expr)->location; break; |
