mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Remove un-needed braces around single statements.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.8 1998/02/26 04:32:57 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.9 1998/06/15 19:28:46 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -129,13 +129,9 @@ pull_args(Expr *qual)
|
||||
return (make_orclause(pull_ors(t_list)));
|
||||
}
|
||||
else if (not_clause((Node *) qual))
|
||||
{
|
||||
return (make_notclause(pull_args(get_notclausearg(qual))));
|
||||
}
|
||||
else
|
||||
{
|
||||
return (qual);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -159,9 +155,7 @@ pull_ors(List *orlist)
|
||||
copyObject((Node *) lnext(orlist)))));
|
||||
}
|
||||
else
|
||||
{
|
||||
return (lcons(lfirst(orlist), pull_ors(lnext(orlist))));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -185,9 +179,7 @@ pull_ands(List *andlist)
|
||||
copyObject((Node *) lnext(andlist)))));
|
||||
}
|
||||
else
|
||||
{
|
||||
return (lcons(lfirst(andlist), pull_ands(lnext(andlist))));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -219,9 +211,7 @@ find_nots(Expr *qual)
|
||||
List *t_list = NIL;
|
||||
|
||||
foreach(temp, qual->args)
|
||||
{
|
||||
t_list = lappend(t_list, find_nots(lfirst(temp)));
|
||||
}
|
||||
|
||||
return (make_andclause(t_list));
|
||||
}
|
||||
@@ -231,9 +221,7 @@ find_nots(Expr *qual)
|
||||
List *t_list = NIL;
|
||||
|
||||
foreach(temp, qual->args)
|
||||
{
|
||||
t_list = lappend(t_list, find_nots(lfirst(temp)));
|
||||
}
|
||||
return (make_orclause(t_list));
|
||||
}
|
||||
else if (not_clause((Node *) qual))
|
||||
@@ -277,9 +265,7 @@ push_nots(Expr *qual)
|
||||
(make_opclause(op, get_leftop(qual), get_rightop(qual)));
|
||||
}
|
||||
else
|
||||
{
|
||||
return (make_notclause(qual));
|
||||
}
|
||||
}
|
||||
else if (and_clause((Node *) qual))
|
||||
{
|
||||
@@ -293,9 +279,7 @@ push_nots(Expr *qual)
|
||||
List *t_list = NIL;
|
||||
|
||||
foreach(temp, qual->args)
|
||||
{
|
||||
t_list = lappend(t_list, push_nots(lfirst(temp)));
|
||||
}
|
||||
return (make_orclause(t_list));
|
||||
}
|
||||
else if (or_clause((Node *) qual))
|
||||
@@ -304,9 +288,7 @@ push_nots(Expr *qual)
|
||||
List *t_list = NIL;
|
||||
|
||||
foreach(temp, qual->args)
|
||||
{
|
||||
t_list = lappend(t_list, push_nots(lfirst(temp)));
|
||||
}
|
||||
return (make_andclause(t_list));
|
||||
}
|
||||
else if (not_clause((Node *) qual))
|
||||
@@ -357,9 +339,7 @@ normalize(Expr *qual)
|
||||
List *t_list = NIL;
|
||||
|
||||
foreach(temp, qual->args)
|
||||
{
|
||||
t_list = lappend(t_list, normalize(lfirst(temp)));
|
||||
}
|
||||
return (make_andclause(t_list));
|
||||
}
|
||||
else if (or_clause((Node *) qual))
|
||||
@@ -370,9 +350,7 @@ normalize(Expr *qual)
|
||||
bool has_andclause = FALSE;
|
||||
|
||||
foreach(temp, qual->args)
|
||||
{
|
||||
orlist = lappend(orlist, normalize(lfirst(temp)));
|
||||
}
|
||||
foreach(temp, orlist)
|
||||
{
|
||||
if (and_clause(lfirst(temp)))
|
||||
@@ -427,9 +405,7 @@ or_normalize(List *orlist)
|
||||
lnext(new_orlist))));
|
||||
}
|
||||
else
|
||||
{
|
||||
return (orlist);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -562,13 +538,9 @@ remove_ands(Expr *qual)
|
||||
return ((List *) make_orclause((List *) t_list));
|
||||
}
|
||||
else if (not_clause((Node *) qual))
|
||||
{
|
||||
return ((List *) make_notclause((Expr *) remove_ands((Expr *) get_notclausearg(qual))));
|
||||
}
|
||||
else
|
||||
{
|
||||
return ((List *) qual);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.10 1998/02/26 04:33:02 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.11 1998/06/15 19:28:46 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -67,9 +67,7 @@ preprocess_targetlist(List *tlist,
|
||||
List *temp = NIL;
|
||||
|
||||
if (result_relation >= 1 && command_type != CMD_SELECT)
|
||||
{
|
||||
relid = getrelid(result_relation, range_table);
|
||||
}
|
||||
|
||||
/*
|
||||
* for heap_formtuple to work, the targetlist must match the exact
|
||||
@@ -171,9 +169,7 @@ expand_targetlist(List *tlist,
|
||||
return (replace_matching_resname(ntlist, tlist));
|
||||
}
|
||||
else
|
||||
{
|
||||
return (tlist);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -210,9 +206,7 @@ replace_matching_resname(List *new_tlist, List *old_tlist)
|
||||
t_list = lappend(t_list, matching_old_tl);
|
||||
}
|
||||
else
|
||||
{
|
||||
t_list = lappend(t_list, new_tle);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.23 1998/03/31 23:30:59 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.24 1998/06/15 19:28:46 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -333,9 +333,7 @@ find_all_inheritors(List *unexamined_relids,
|
||||
new_examined_relids);
|
||||
|
||||
if (new_unexamined_relids == NULL)
|
||||
{
|
||||
return (new_examined_relids);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (find_all_inheritors(new_unexamined_relids,
|
||||
|
Reference in New Issue
Block a user