summaryrefslogtreecommitdiff
path: root/src/backend/parser/analyze.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser/analyze.c')
-rw-r--r--src/backend/parser/analyze.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 3e2f64866d5..4fb793cfbf0 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -305,7 +305,7 @@ transformStmt(ParseState *pstate, Node *parseTree)
*/
case T_DeclareCursorStmt:
result = transformDeclareCursorStmt(pstate,
- (DeclareCursorStmt *) parseTree);
+ (DeclareCursorStmt *) parseTree);
break;
case T_ExplainStmt:
@@ -315,7 +315,7 @@ transformStmt(ParseState *pstate, Node *parseTree)
case T_CreateTableAsStmt:
result = transformCreateTableAsStmt(pstate,
- (CreateTableAsStmt *) parseTree);
+ (CreateTableAsStmt *) parseTree);
break;
default:
@@ -490,7 +490,7 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
qry->override = stmt->override;
isOnConflictUpdate = (stmt->onConflictClause &&
- stmt->onConflictClause->action == ONCONFLICT_UPDATE);
+ stmt->onConflictClause->action == ONCONFLICT_UPDATE);
/*
* We have three cases to deal with: DEFAULT VALUES (selectStmt == NULL),
@@ -839,7 +839,7 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
qry->targetList = lappend(qry->targetList, tle);
rte->insertedCols = bms_add_member(rte->insertedCols,
- attr_num - FirstLowInvalidHeapAttributeNumber);
+ attr_num - FirstLowInvalidHeapAttributeNumber);
icols = lnext(icols);
attnos = lnext(attnos);
@@ -918,7 +918,7 @@ transformInsertRow(ParseState *pstate, List *exprlist,
errmsg("INSERT has more expressions than target columns"),
parser_errposition(pstate,
exprLocation(list_nth(exprlist,
- list_length(icolumns))))));
+ list_length(icolumns))))));
if (stmtcols != NIL &&
list_length(exprlist) < list_length(icolumns))
{
@@ -940,7 +940,7 @@ transformInsertRow(ParseState *pstate, List *exprlist,
errhint("The insertion source is a row expression containing the same number of columns expected by the INSERT. Did you accidentally use extra parentheses?") : 0),
parser_errposition(pstate,
exprLocation(list_nth(icolumns,
- list_length(exprlist))))));
+ list_length(exprlist))))));
}
/*
@@ -1199,7 +1199,7 @@ transformSelectStmt(ParseState *pstate, SelectStmt *stmt)
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("SELECT ... INTO is not allowed here"),
parser_errposition(pstate,
- exprLocation((Node *) stmt->intoClause))));
+ exprLocation((Node *) stmt->intoClause))));
/* make FOR UPDATE/FOR SHARE info available to addRangeTableEntry */
pstate->p_locking_clause = stmt->lockingClause;
@@ -1528,7 +1528,7 @@ transformValuesClause(ParseState *pstate, SelectStmt *stmt)
translator: %s is a SQL row locking clause such as FOR UPDATE */
errmsg("%s cannot be applied to VALUES",
LCS_asString(((LockingClause *)
- linitial(stmt->lockingClause))->strength))));
+ linitial(stmt->lockingClause))->strength))));
qry->rtable = pstate->p_rtable;
qry->jointree = makeFromExpr(pstate->p_joinlist, NULL);
@@ -1596,7 +1596,7 @@ transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt)
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("SELECT ... INTO is not allowed here"),
parser_errposition(pstate,
- exprLocation((Node *) leftmostSelect->intoClause))));
+ exprLocation((Node *) leftmostSelect->intoClause))));
/*
* We need to extract ORDER BY and other top-level clauses here and not
@@ -1749,7 +1749,7 @@ transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt)
errdetail("Only result column names can be used, not expressions or functions."),
errhint("Add the expression/function to every SELECT, or move the UNION into a FROM clause."),
parser_errposition(pstate,
- exprLocation(list_nth(qry->targetList, tllen)))));
+ exprLocation(list_nth(qry->targetList, tllen)))));
qry->limitOffset = transformLimitClause(pstate, limitOffset,
EXPR_KIND_OFFSET, "OFFSET");
@@ -1810,7 +1810,7 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("INTO is only allowed on first SELECT of UNION/INTERSECT/EXCEPT"),
parser_errposition(pstate,
- exprLocation((Node *) stmt->intoClause))));
+ exprLocation((Node *) stmt->intoClause))));
/* We don't support FOR UPDATE/SHARE with set ops at the moment. */
if (stmt->lockingClause)
@@ -1820,7 +1820,7 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt,
translator: %s is a SQL row locking clause such as FOR UPDATE */
errmsg("%s is not allowed with UNION/INTERSECT/EXCEPT",
LCS_asString(((LockingClause *)
- linitial(stmt->lockingClause))->strength))));
+ linitial(stmt->lockingClause))->strength))));
/*
* If an internal node of a set-op tree has ORDER BY, LIMIT, FOR UPDATE,
@@ -1882,7 +1882,7 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt,
(errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
errmsg("UNION/INTERSECT/EXCEPT member statement cannot refer to other relations of same query level"),
parser_errposition(pstate,
- locate_var_of_level((Node *) selectQuery, 1))));
+ locate_var_of_level((Node *) selectQuery, 1))));
}
/*
@@ -1969,8 +1969,8 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt,
if (list_length(ltargetlist) != list_length(rtargetlist))
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("each %s query must have the same number of columns",
- context),
+ errmsg("each %s query must have the same number of columns",
+ context),
parser_errposition(pstate,
exprLocation((Node *) rtargetlist))));
@@ -2067,8 +2067,8 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt,
* collation.)
*/
rescolcoll = select_common_collation(pstate,
- list_make2(lcolnode, rcolnode),
- (op->op == SETOP_UNION && op->all));
+ list_make2(lcolnode, rcolnode),
+ (op->op == SETOP_UNION && op->all));
/* emit results */
op->colTypes = lappend_oid(op->colTypes, rescoltype);
@@ -2309,7 +2309,7 @@ transformUpdateTargetList(ParseState *pstate, List *origTlist)
(errcode(ERRCODE_UNDEFINED_COLUMN),
errmsg("column \"%s\" of relation \"%s\" does not exist",
origTarget->name,
- RelationGetRelationName(pstate->p_target_relation)),
+ RelationGetRelationName(pstate->p_target_relation)),
parser_errposition(pstate, origTarget->location)));
updateTargetListEntry(pstate, tle, origTarget->name,
@@ -2319,7 +2319,7 @@ transformUpdateTargetList(ParseState *pstate, List *origTlist)
/* Mark the target column as requiring update permissions */
target_rte->updatedCols = bms_add_member(target_rte->updatedCols,
- attrno - FirstLowInvalidHeapAttributeNumber);
+ attrno - FirstLowInvalidHeapAttributeNumber);
orig_tl = lnext(orig_tl);
}
@@ -2766,25 +2766,25 @@ transformLockingClause(ParseState *pstate, Query *qry, LockingClause *lc,
translator: %s is a SQL row locking clause such as FOR UPDATE */
errmsg("%s cannot be applied to a join",
LCS_asString(lc->strength)),
- parser_errposition(pstate, thisrel->location)));
+ parser_errposition(pstate, thisrel->location)));
break;
case RTE_FUNCTION:
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
/*------
translator: %s is a SQL row locking clause such as FOR UPDATE */
- errmsg("%s cannot be applied to a function",
- LCS_asString(lc->strength)),
- parser_errposition(pstate, thisrel->location)));
+ errmsg("%s cannot be applied to a function",
+ LCS_asString(lc->strength)),
+ parser_errposition(pstate, thisrel->location)));
break;
case RTE_TABLEFUNC:
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
/*------
translator: %s is a SQL row locking clause such as FOR UPDATE */
- errmsg("%s cannot be applied to a table function",
- LCS_asString(lc->strength)),
- parser_errposition(pstate, thisrel->location)));
+ errmsg("%s cannot be applied to a table function",
+ LCS_asString(lc->strength)),
+ parser_errposition(pstate, thisrel->location)));
break;
case RTE_VALUES:
ereport(ERROR,
@@ -2793,16 +2793,16 @@ transformLockingClause(ParseState *pstate, Query *qry, LockingClause *lc,
translator: %s is a SQL row locking clause such as FOR UPDATE */
errmsg("%s cannot be applied to VALUES",
LCS_asString(lc->strength)),
- parser_errposition(pstate, thisrel->location)));
+ parser_errposition(pstate, thisrel->location)));
break;
case RTE_CTE:
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
/*------
translator: %s is a SQL row locking clause such as FOR UPDATE */
- errmsg("%s cannot be applied to a WITH query",
- LCS_asString(lc->strength)),
- parser_errposition(pstate, thisrel->location)));
+ errmsg("%s cannot be applied to a WITH query",
+ LCS_asString(lc->strength)),
+ parser_errposition(pstate, thisrel->location)));
break;
case RTE_NAMEDTUPLESTORE:
ereport(ERROR,
@@ -2811,7 +2811,7 @@ transformLockingClause(ParseState *pstate, Query *qry, LockingClause *lc,
translator: %s is a SQL row locking clause such as FOR UPDATE */
errmsg("%s cannot be applied to a named tuplestore",
LCS_asString(lc->strength)),
- parser_errposition(pstate, thisrel->location)));
+ parser_errposition(pstate, thisrel->location)));
break;
default:
elog(ERROR, "unrecognized RTE type: %d",