diff options
| author | Robert Haas | 2016-05-03 14:52:25 +0000 |
|---|---|---|
| committer | Robert Haas | 2016-05-03 14:52:25 +0000 |
| commit | 8826d850781cb328482c8f92af2a3d93385cd63b (patch) | |
| tree | 4fe1529d761610370259c5c8e3eab74b869c956b /src/backend/utils | |
| parent | 1e77949e67b94af4d2a350c6dac9109419932608 (diff) | |
Tweak a few more things in preparation for upcoming pgindent run.
These adjustments adjust code and comments in minor ways to prevent
pgindent from mangling them. Among other things, I tried to avoid
situations where pgindent would emit "a +b" instead of "a + b", and I
tried to avoid having it break up inline comments across multiple
lines.
Diffstat (limited to 'src/backend/utils')
| -rw-r--r-- | src/backend/utils/adt/dbsize.c | 9 | ||||
| -rw-r--r-- | src/backend/utils/adt/tsginidx.c | 7 | ||||
| -rw-r--r-- | src/backend/utils/adt/tsvector_op.c | 3 |
3 files changed, 12 insertions, 7 deletions
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c index 1db4acf175e..4ec2fed2b35 100644 --- a/src/backend/utils/adt/dbsize.c +++ b/src/backend/utils/adt/dbsize.c @@ -817,11 +817,14 @@ pg_size_bytes(PG_FUNCTION_ARGS) else if (pg_strcasecmp(strptr, "kb") == 0) multiplier = (int64) 1024; else if (pg_strcasecmp(strptr, "mb") == 0) - multiplier = (int64) 1024 * 1024; + multiplier = ((int64) 1024) * 1024; + else if (pg_strcasecmp(strptr, "gb") == 0) - multiplier = (int64) 1024 * 1024 * 1024; + multiplier = ((int64) 1024) * 1024 * 1024; + else if (pg_strcasecmp(strptr, "tb") == 0) - multiplier = (int64) 1024 * 1024 * 1024 * 1024; + multiplier = ((int64) 1024) * 1024 * 1024 * 1024; + else ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), diff --git a/src/backend/utils/adt/tsginidx.c b/src/backend/utils/adt/tsginidx.c index 3f1e7f961f6..ebc11c9e4eb 100644 --- a/src/backend/utils/adt/tsginidx.c +++ b/src/backend/utils/adt/tsginidx.c @@ -222,9 +222,10 @@ TS_execute_ternary(GinChkVal *gcv, QueryItem *curitem) check_stack_depth(); if (curitem->type == QI_VAL) - return checkcondition_gin_internal(gcv, - (QueryOperand *) curitem, - NULL /* don't have any position info */); + return + checkcondition_gin_internal(gcv, + (QueryOperand *) curitem, + NULL /* don't have position info */ ); switch (curitem->qoperator.oper) { diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c index d4fb0ff036d..8298e38545b 100644 --- a/src/backend/utils/adt/tsvector_op.c +++ b/src/backend/utils/adt/tsvector_op.c @@ -834,7 +834,8 @@ tsvector_filter(PG_FUNCTION_ARGS) posvout->pos[npos++] = posvin->pos[k]; } - if (!npos) /* no satisfactory positions found, so skip that lexeme */ + /* if no satisfactory positions found, skip lexeme */ + if (!npos) continue; arrout[j].haspos = true; |
