summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/tsquery_rewrite.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2007-11-15 21:14:46 +0000
committerBruce Momjian <bruce@momjian.us>2007-11-15 21:14:46 +0000
commitfdf5a5efb7b28c13085fe7313658de8d7b9914f6 (patch)
treea75cf1422fa1eef4e801cf502b148d8ce1b5dfe7 /src/backend/utils/adt/tsquery_rewrite.c
parent3adc760fb92eab1a8720337a8bf9b66486609eb3 (diff)
downloadpostgresql-fdf5a5efb7b28c13085fe7313658de8d7b9914f6.tar.gz
pgindent run for 8.3.
Diffstat (limited to 'src/backend/utils/adt/tsquery_rewrite.c')
-rw-r--r--src/backend/utils/adt/tsquery_rewrite.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/backend/utils/adt/tsquery_rewrite.c b/src/backend/utils/adt/tsquery_rewrite.c
index 51f05a0d69..1dedf138b2 100644
--- a/src/backend/utils/adt/tsquery_rewrite.c
+++ b/src/backend/utils/adt/tsquery_rewrite.c
@@ -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;