Skip to content

Commit a5f9a9f

Browse files
author
Nikita Glukhov
committed
Add generic json
1 parent 9606d29 commit a5f9a9f

File tree

14 files changed

+1280
-209
lines changed

14 files changed

+1280
-209
lines changed

src/backend/tsearch/to_tsany.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ typedef struct TSVectorBuildState
4242
Oid cfgId;
4343
} TSVectorBuildState;
4444

45-
static void add_to_tsvector(void *_state, char *elem_value, int elem_len);
45+
static void add_to_tsvector(void *_state, const char *elem_value, int elem_len);
4646

4747

4848
Datum
@@ -439,7 +439,7 @@ json_to_tsvector(PG_FUNCTION_ARGS)
439439
* Parse lexemes in an element of a json(b) value, add to TSVectorBuildState.
440440
*/
441441
static void
442-
add_to_tsvector(void *_state, char *elem_value, int elem_len)
442+
add_to_tsvector(void *_state, const char *elem_value, int elem_len)
443443
{
444444
TSVectorBuildState *state = (TSVectorBuildState *) _state;
445445
ParsedText *prs = state->prs;
@@ -459,7 +459,7 @@ add_to_tsvector(void *_state, char *elem_value, int elem_len)
459459

460460
prevwords = prs->curwords;
461461

462-
parsetext(state->cfgId, prs, elem_value, elem_len);
462+
parsetext(state->cfgId, prs, (char *) elem_value, elem_len);
463463

464464
/*
465465
* If we extracted any words from this JSON element, advance pos to create

src/backend/utils/adt/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ OBJS = \
4848
int.o \
4949
int8.o \
5050
json.o \
51+
json_generic.o \
5152
jsonb.o \
5253
jsonb_gin.o \
5354
jsonb_op.o \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy