summaryrefslogtreecommitdiff
path: root/contrib/ltree
diff options
context:
space:
mode:
authorTom Lane2017-06-21 19:35:54 +0000
committerTom Lane2017-06-21 19:35:54 +0000
commit382ceffdf7f620d8f2d50e451b4167d291ae2348 (patch)
treef558251492f2c6f86e3566f7a82f9d00509122c2 /contrib/ltree
parentc7b8998ebbf310a156aa38022555a24d98fdbfb4 (diff)
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they flow past the right margin. By default, BSD indent lines up statement continuation lines that are within parentheses so that they start just to the right of the preceding left parenthesis. However, traditionally, if that resulted in the continuation line extending to the right of the desired right margin, then indent would push it left just far enough to not overrun the margin, if it could do so without making the continuation line start to the left of the current statement indent. That makes for a weird mix of indentations unless one has been completely rigid about never violating the 80-column limit. This behavior has been pretty universally panned by Postgres developers. Hence, disable it with indent's new -lpl switch, so that parenthesized lines are always lined up with the preceding left paren. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'contrib/ltree')
-rw-r--r--contrib/ltree/_ltree_op.c2
-rw-r--r--contrib/ltree/lquery_op.c2
-rw-r--r--contrib/ltree/ltree.h2
-rw-r--r--contrib/ltree/ltree_gist.c12
-rw-r--r--contrib/ltree/ltree_io.c8
5 files changed, 13 insertions, 13 deletions
diff --git a/contrib/ltree/_ltree_op.c b/contrib/ltree/_ltree_op.c
index c0c56a40d4f..fdf6ebb43b1 100644
--- a/contrib/ltree/_ltree_op.c
+++ b/contrib/ltree/_ltree_op.c
@@ -53,7 +53,7 @@ array_iterator(ArrayType *la, PGCALL2 callback, void *param, ltree **found)
while (num > 0)
{
if (DatumGetBool(DirectFunctionCall2(callback,
- PointerGetDatum(item), PointerGetDatum(param))))
+ PointerGetDatum(item), PointerGetDatum(param))))
{
if (found)
diff --git a/contrib/ltree/lquery_op.c b/contrib/ltree/lquery_op.c
index 3bf5818e3a1..229ddd0ae3d 100644
--- a/contrib/ltree/lquery_op.c
+++ b/contrib/ltree/lquery_op.c
@@ -356,7 +356,7 @@ lt_q_regex(PG_FUNCTION_ARGS)
while (num > 0)
{
if (DatumGetBool(DirectFunctionCall2(ltq_regex,
- PointerGetDatum(tree), PointerGetDatum(query))))
+ PointerGetDatum(tree), PointerGetDatum(query))))
{
res = true;
diff --git a/contrib/ltree/ltree.h b/contrib/ltree/ltree.h
index 7a7a1540976..fd86323ffe0 100644
--- a/contrib/ltree/ltree.h
+++ b/contrib/ltree/ltree.h
@@ -161,7 +161,7 @@ bool ltree_execute(ITEM *curitem, void *checkval,
int ltree_compare(const ltree *a, const ltree *b);
bool inner_isparent(const ltree *c, const ltree *p);
bool compare_subnode(ltree_level *t, char *q, int len,
- int (*cmpptr) (const char *, const char *, size_t), bool anyend);
+ int (*cmpptr) (const char *, const char *, size_t), bool anyend);
ltree *lca_inner(ltree **a, int len);
int ltree_strncasecmp(const char *a, const char *b, size_t s);
diff --git a/contrib/ltree/ltree_gist.c b/contrib/ltree/ltree_gist.c
index 37ee3377ff3..70e78a672ac 100644
--- a/contrib/ltree/ltree_gist.c
+++ b/contrib/ltree/ltree_gist.c
@@ -672,8 +672,8 @@ ltree_consistent(PG_FUNCTION_ARGS)
query = PG_GETARG_LQUERY(1);
if (GIST_LEAF(entry))
res = DatumGetBool(DirectFunctionCall2(ltq_regex,
- PointerGetDatum(LTG_NODE(key)),
- PointerGetDatum((lquery *) query)
+ PointerGetDatum(LTG_NODE(key)),
+ PointerGetDatum((lquery *) query)
));
else
res = (gist_qe(key, (lquery *) query) && gist_between(key, (lquery *) query));
@@ -683,8 +683,8 @@ ltree_consistent(PG_FUNCTION_ARGS)
query = PG_GETARG_LQUERY(1);
if (GIST_LEAF(entry))
res = DatumGetBool(DirectFunctionCall2(ltxtq_exec,
- PointerGetDatum(LTG_NODE(key)),
- PointerGetDatum((lquery *) query)
+ PointerGetDatum(LTG_NODE(key)),
+ PointerGetDatum((lquery *) query)
));
else
res = gist_qtxt(key, (ltxtquery *) query);
@@ -694,8 +694,8 @@ ltree_consistent(PG_FUNCTION_ARGS)
query = DatumGetPointer(PG_DETOAST_DATUM(PG_GETARG_DATUM(1)));
if (GIST_LEAF(entry))
res = DatumGetBool(DirectFunctionCall2(lt_q_regex,
- PointerGetDatum(LTG_NODE(key)),
- PointerGetDatum((ArrayType *) query)
+ PointerGetDatum(LTG_NODE(key)),
+ PointerGetDatum((ArrayType *) query)
));
else
res = arrq_cons(key, (ArrayType *) query);
diff --git a/contrib/ltree/ltree_io.c b/contrib/ltree/ltree_io.c
index a1d4a0d38fa..34ca597a484 100644
--- a/contrib/ltree/ltree_io.c
+++ b/contrib/ltree/ltree_io.c
@@ -61,8 +61,8 @@ ltree_in(PG_FUNCTION_ARGS)
if (num + 1 > MaxAllocSize / sizeof(nodeitem))
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
- num + 1, (int) (MaxAllocSize / sizeof(nodeitem)))));
+ errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
+ num + 1, (int) (MaxAllocSize / sizeof(nodeitem)))));
list = lptr = (nodeitem *) palloc(sizeof(nodeitem) * (num + 1));
ptr = buf;
while (*ptr)
@@ -230,8 +230,8 @@ lquery_in(PG_FUNCTION_ARGS)
if (num > MaxAllocSize / ITEMSIZE)
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
- num, (int) (MaxAllocSize / ITEMSIZE))));
+ errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
+ num, (int) (MaxAllocSize / ITEMSIZE))));
curqlevel = tmpql = (lquery_level *) palloc0(ITEMSIZE * num);
ptr = buf;
while (*ptr)