aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/tsvector_op.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/tsvector_op.c')
-rw-r--r--src/backend/utils/adt/tsvector_op.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c
index e33ca5abe75..cab6874e702 100644
--- a/src/backend/utils/adt/tsvector_op.c
+++ b/src/backend/utils/adt/tsvector_op.c
@@ -666,9 +666,7 @@ tsvector_unnest(PG_FUNCTION_ARGS)
bool nulls[] = {false, false, false};
Datum values[3];
- values[0] = PointerGetDatum(
- cstring_to_text_with_len(data + arrin[i].pos, arrin[i].len)
- );
+ values[0] = PointerGetDatum(cstring_to_text_with_len(data + arrin[i].pos, arrin[i].len));
if (arrin[i].haspos)
{
@@ -689,15 +687,14 @@ tsvector_unnest(PG_FUNCTION_ARGS)
{
positions[j] = Int16GetDatum(WEP_GETPOS(posv->pos[j]));
weight = 'D' - WEP_GETWEIGHT(posv->pos[j]);
- weights[j] = PointerGetDatum(
- cstring_to_text_with_len(&weight, 1)
- );
+ weights[j] = PointerGetDatum(cstring_to_text_with_len(&weight,
+ 1));
}
- values[1] = PointerGetDatum(
- construct_array(positions, posv->npos, INT2OID, 2, true, 's'));
- values[2] = PointerGetDatum(
- construct_array(weights, posv->npos, TEXTOID, -1, false, 'i'));
+ values[1] = PointerGetDatum(construct_array(positions, posv->npos,
+ INT2OID, 2, true, 's'));
+ values[2] = PointerGetDatum(construct_array(weights, posv->npos,
+ TEXTOID, -1, false, 'i'));
}
else
{
@@ -730,9 +727,8 @@ tsvector_to_array(PG_FUNCTION_ARGS)
for (i = 0; i < tsin->size; i++)
{
- elements[i] = PointerGetDatum(
- cstring_to_text_with_len(STRPTR(tsin) + arrin[i].pos, arrin[i].len)
- );
+ elements[i] = PointerGetDatum(cstring_to_text_with_len(STRPTR(tsin) + arrin[i].pos,
+ arrin[i].len));
}
array = construct_array(elements, tsin->size, TEXTOID, -1, false, 'i');