aboutsummaryrefslogtreecommitdiff
path: root/contrib/intarray/_int_gist.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-11-22 18:17:34 +0000
committerBruce Momjian <bruce@momjian.us>2005-11-22 18:17:34 +0000
commit436a2956d80db29ac1dff640b631620d856b4f70 (patch)
treedb2252048385dd23a7d7a196e8685cb0a5816f7a /contrib/intarray/_int_gist.c
parente196eedd8a95380fb392c00b9e7ea88a0e46053e (diff)
downloadpostgresql-436a2956d80db29ac1dff640b631620d856b4f70.tar.gz
postgresql-436a2956d80db29ac1dff640b631620d856b4f70.zip
Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
Diffstat (limited to 'contrib/intarray/_int_gist.c')
-rw-r--r--contrib/intarray/_int_gist.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c
index 1e26bcef284..8f6dab69fe1 100644
--- a/contrib/intarray/_int_gist.c
+++ b/contrib/intarray/_int_gist.c
@@ -39,7 +39,7 @@ g_int_consistent(PG_FUNCTION_ARGS)
if (strategy == BooleanSearchStrategy)
PG_RETURN_BOOL(execconsistent((QUERYTYPE *) query,
(ArrayType *) DatumGetPointer(entry->key),
- GIST_LEAF(entry)));
+ GIST_LEAF(entry)));
/* XXX are we sure it's safe to scribble on the query object here? */
/* XXX what about toasted input? */
@@ -97,7 +97,7 @@ g_int_union(PG_FUNCTION_ARGS)
for (i = 0; i < entryvec->n; i++)
{
- ArrayType *ent = GETENTRY(entryvec, i);
+ ArrayType *ent = GETENTRY(entryvec, i);
CHECKARRVALID(ent);
totlen += ARRNELEMS(ent);
@@ -108,8 +108,8 @@ g_int_union(PG_FUNCTION_ARGS)
for (i = 0; i < entryvec->n; i++)
{
- ArrayType *ent = GETENTRY(entryvec, i);
- int nel;
+ ArrayType *ent = GETENTRY(entryvec, i);
+ int nel;
nel = ARRNELEMS(ent);
memcpy(ptr, ARRPTR(ent), nel * sizeof(int4));
@@ -143,10 +143,10 @@ g_int_compress(PG_FUNCTION_ARGS)
CHECKARRVALID(r);
PREPAREARR(r);
- if (ARRNELEMS(r)>= 2 * MAXNUMRANGE)
- elog(NOTICE,"Input array is too big (%d maximum allowed, %d current), use gist__intbig_ops opclass instead",
- 2 * MAXNUMRANGE - 1, ARRNELEMS(r));
-
+ if (ARRNELEMS(r) >= 2 * MAXNUMRANGE)
+ elog(NOTICE, "Input array is too big (%d maximum allowed, %d current), use gist__intbig_ops opclass instead",
+ 2 * MAXNUMRANGE - 1, ARRNELEMS(r));
+
retval = palloc(sizeof(GISTENTRY));
gistentryinit(*retval, PointerGetDatum(r),
entry->rel, entry->page, entry->offset, VARSIZE(r), FALSE);
@@ -154,12 +154,14 @@ g_int_compress(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(retval);
}
- /* leaf entries never compress one more time, only when entry->leafkey ==true,
- so now we work only with internal keys */
+ /*
+ * leaf entries never compress one more time, only when entry->leafkey
+ * ==true, so now we work only with internal keys
+ */
r = (ArrayType *) PG_DETOAST_DATUM(entry->key);
CHECKARRVALID(r);
- if (ARRISVOID(r))
+ if (ARRISVOID(r))
{
if (r != (ArrayType *) DatumGetPointer(entry->key))
pfree(r);