mirror of
https://github.com/postgres/postgres.git
synced 2025-10-28 11:55:03 +03:00
pgindent run for 8.3.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_rewrite.c,v 1.8 2007/11/13 22:14:50 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_rewrite.c,v 1.9 2007/11/15 21:14:39 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -43,16 +43,16 @@ addone(int *counters, int last, int total)
|
||||
* by returning either node or a copy of subs.
|
||||
*/
|
||||
static QTNode *
|
||||
findeq(QTNode *node, QTNode *ex, QTNode *subs, bool *isfind)
|
||||
findeq(QTNode * node, QTNode * ex, QTNode * subs, bool *isfind)
|
||||
{
|
||||
|
||||
if ((node->sign & ex->sign) != ex->sign ||
|
||||
if ((node->sign & ex->sign) != ex->sign ||
|
||||
node->valnode->type != ex->valnode->type)
|
||||
return node;
|
||||
|
||||
if (node->flags & QTN_NOCHANGE)
|
||||
return node;
|
||||
|
||||
|
||||
if (node->valnode->type == QI_OPR)
|
||||
{
|
||||
if (node->valnode->operator.oper != ex->valnode->operator.oper)
|
||||
@@ -77,9 +77,8 @@ findeq(QTNode *node, QTNode *ex, QTNode *subs, bool *isfind)
|
||||
{
|
||||
/*
|
||||
* AND and NOT are commutative, so we check if a subset of the
|
||||
* children match. For example, if tnode is A | B | C, and
|
||||
* ex is B | C, we have a match after we convert tnode to
|
||||
* A | (B | C).
|
||||
* children match. For example, if tnode is A | B | C, and ex is B
|
||||
* | C, we have a match after we convert tnode to A | (B | C).
|
||||
*/
|
||||
int *counters = (int *) palloc(sizeof(int) * node->nchild);
|
||||
int i;
|
||||
@@ -149,7 +148,7 @@ findeq(QTNode *node, QTNode *ex, QTNode *subs, bool *isfind)
|
||||
pfree(counters);
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
Assert(node->valnode->type == QI_VAL);
|
||||
|
||||
@@ -175,7 +174,7 @@ findeq(QTNode *node, QTNode *ex, QTNode *subs, bool *isfind)
|
||||
}
|
||||
|
||||
static QTNode *
|
||||
dofindsubquery(QTNode *root, QTNode *ex, QTNode *subs, bool *isfind)
|
||||
dofindsubquery(QTNode * root, QTNode * ex, QTNode * subs, bool *isfind)
|
||||
{
|
||||
/* since this function recurses, it could be driven to stack overflow. */
|
||||
check_stack_depth();
|
||||
@@ -234,7 +233,7 @@ dropvoidsubtree(QTNode * root)
|
||||
}
|
||||
|
||||
QTNode *
|
||||
findsubquery(QTNode *root, QTNode *ex, QTNode *subs, bool *isfind)
|
||||
findsubquery(QTNode * root, QTNode * ex, QTNode * subs, bool *isfind)
|
||||
{
|
||||
bool DidFind = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user