mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Add parse location fields to NullTest and BooleanTest structs.
We did not need a location tag on NullTest or BooleanTest before, because no error messages referred directly to their locations. That's planned to change though, so add these fields in a separate housekeeping commit. Catversion bump because stored rules may change.
This commit is contained in:
@ -1346,12 +1346,22 @@ exprLocation(const Node *expr)
|
||||
}
|
||||
break;
|
||||
case T_NullTest:
|
||||
/* just use argument's location */
|
||||
loc = exprLocation((Node *) ((const NullTest *) expr)->arg);
|
||||
{
|
||||
const NullTest *nexpr = (const NullTest *) expr;
|
||||
|
||||
/* Much as above */
|
||||
loc = leftmostLoc(nexpr->location,
|
||||
exprLocation((Node *) nexpr->arg));
|
||||
}
|
||||
break;
|
||||
case T_BooleanTest:
|
||||
/* just use argument's location */
|
||||
loc = exprLocation((Node *) ((const BooleanTest *) expr)->arg);
|
||||
{
|
||||
const BooleanTest *bexpr = (const BooleanTest *) expr;
|
||||
|
||||
/* Much as above */
|
||||
loc = leftmostLoc(bexpr->location,
|
||||
exprLocation((Node *) bexpr->arg));
|
||||
}
|
||||
break;
|
||||
case T_CoerceToDomain:
|
||||
{
|
||||
|
Reference in New Issue
Block a user