1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Cleanup of source files where 'return' or 'var =' is alone on a line.

This commit is contained in:
Bruce Momjian
1999-02-03 21:18:02 +00:00
parent 3982368a4e
commit 9322950aa4
101 changed files with 422 additions and 743 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.39 1999/01/24 00:28:29 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.40 1999/02/03 21:16:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -295,8 +295,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
foreach(llist, left_expr)
lfirst(llist) = transformExpr(pstate, lfirst(llist), precedence);
if (length(left_expr) !=
length(right_expr))
if (length(left_expr) != length(right_expr))
elog(ERROR, "parser: Subselect has too many or too few fields.");
if (length(left_expr) > 1 &&
@@ -520,8 +519,7 @@ transformIdent(ParseState *pstate, Node *expr, int precedence)
/* we add the relation name for them */
att->relname = rte->refname;
att->attrs = lcons(makeString(ident->name), NIL);
column_result =
(Node *) ParseNestedFuncOrColumn(pstate, att, &pstate->p_last_resno,
column_result = (Node *) ParseNestedFuncOrColumn(pstate, att, &pstate->p_last_resno,
precedence);
}
@@ -731,8 +729,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int32 atttypmod)
break;
case FLOAT4OID: /* float4 */
{
float32 floatVal =
DatumGetFloat32(((Const *) expr)->constvalue);
float32 floatVal = DatumGetFloat32(((Const *) expr)->constvalue);
const_string = (char *) palloc(256);
string_palloced = true;
@@ -741,8 +738,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int32 atttypmod)
}
case FLOAT8OID: /* float8 */
{
float64 floatVal =
DatumGetFloat64(((Const *) expr)->constvalue);
float64 floatVal = DatumGetFloat64(((Const *) expr)->constvalue);
const_string = (char *) palloc(256);
string_palloced = true;
@@ -756,13 +752,11 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int32 atttypmod)
(long) ((Const *) expr)->constvalue);
break;
case TEXTOID: /* text */
const_string =
DatumGetPointer(((Const *) expr)->constvalue);
const_string = DatumGetPointer(((Const *) expr)->constvalue);
const_string = (char *) textout((struct varlena *) const_string);
break;
case UNKNOWNOID: /* unknown */
const_string =
DatumGetPointer(((Const *) expr)->constvalue);
const_string = DatumGetPointer(((Const *) expr)->constvalue);
const_string = (char *) textout((struct varlena *) const_string);
break;
default:

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.36 1998/12/23 14:38:40 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.37 1999/02/03 21:16:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -463,8 +463,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
*/
toid = typeTypeId(typenameType(relname));
/* replace it in the arg list */
lfirst(fargs) =
makeVar(vnum, 0, toid, -1, 0, vnum, 0);
lfirst(fargs) = makeVar(vnum, 0, toid, -1, 0, vnum, 0);
}
else if (!attisset)
{ /* set functions don't have parameters */
@@ -554,8 +553,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
{
if (!strcmp(funcname, "*"))
{
funcnode->func_tlist =
expandAll(pstate, relname, refname, curr_resno);
funcnode->func_tlist = expandAll(pstate, relname, refname, curr_resno);
}
else
{
@@ -697,8 +695,7 @@ func_get_candidates(char *funcname, int nargs)
palloc(8 * sizeof(Oid));
MemSet(current_candidate->args, 0, 8 * sizeof(Oid));
for (i = 0; i < nargs; i++)
current_candidate->args[i] =
pgProcP->proargtypes[i];
current_candidate->args[i] = pgProcP->proargtypes[i];
current_candidate->next = candidates;
candidates = current_candidate;
@@ -1003,8 +1000,7 @@ func_get_detail(char *funcname,
}
current_input_typeids = *input_typeid_vector++;
}
while (current_input_typeids !=
InvalidOid && ncandidates == 0);
while (current_input_typeids != InvalidOid && ncandidates == 0);
}
}
@@ -1292,8 +1288,7 @@ make_arguments(ParseState *pstate,
*/
if (input_typeids[i] == UNKNOWNOID && function_typeids[i] != InvalidOid)
{
lfirst(current_fargs) =
parser_typecast2(lfirst(current_fargs),
lfirst(current_fargs) = parser_typecast2(lfirst(current_fargs),
input_typeids[i],
typeidType(function_typeids[i]),
-1);
@@ -1420,8 +1415,7 @@ ParseComplexProjection(ParseState *pstate,
}
if (RelationIsValid(rd))
{
func->func_tlist =
setup_tlist(funcname, argrelid);
func->func_tlist = setup_tlist(funcname, argrelid);
iter->itertype = attnumTypeId(rd, attnum);
return (Node *) iter;
}
@@ -1480,8 +1474,7 @@ ParseComplexProjection(ParseState *pstate,
{
Expr *newexpr;
funcnode->func_tlist =
setup_tlist(funcname, argrelid);
funcnode->func_tlist = setup_tlist(funcname, argrelid);
funcnode->functype = attnumTypeId(rd, attnum);
newexpr = makeNode(Expr);

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.33 1999/01/24 00:28:30 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.34 1999/02/03 21:16:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -612,8 +612,7 @@ transformTargetList(ParseState *pstate, List *targetlist)
p_target = tail_p_target = expandAll(pstate, att->relname,
att->relname, &pstate->p_last_resno);
else
lnext(tail_p_target) =
expandAll(pstate, att->relname, att->relname,
lnext(tail_p_target) = expandAll(pstate, att->relname, att->relname,
&pstate->p_last_resno);
expand_star = true;
}