PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "common/int.h"
#include "libpq/pqformat.h"
#include "nodes/miscnodes.h"
#include "tsearch/ts_locale.h"
#include "tsearch/ts_utils.h"
#include "utils/fmgrprotos.h"
#include "utils/memutils.h"
#include "varatt.h"
Go to the source code of this file.
Data Structures | |
struct | WordEntryIN |
Functions | |
int | compareWordEntryPos (const void *a, const void *b) |
static int | uniquePos (WordEntryPos *a, int l) |
static int | compareentry (const void *va, const void *vb, void *arg) |
static int | uniqueentry (WordEntryIN *a, int l, char *buf, int *outbuflen) |
static int | WordEntryCMP (WordEntry *a, WordEntry *b, char *buf) |
Datum | tsvectorin (PG_FUNCTION_ARGS) |
Datum | tsvectorout (PG_FUNCTION_ARGS) |
Datum | tsvectorsend (PG_FUNCTION_ARGS) |
Datum | tsvectorrecv (PG_FUNCTION_ARGS) |
|
static |
Definition at line 84 of file tsvector.c.
References a, arg, b, and tsCompareString().
Referenced by tsvectorrecv(), uniqueentry(), and WordEntryCMP().
int compareWordEntryPos | ( | const void * | a, |
const void * | b | ||
) |
Definition at line 36 of file tsvector.c.
References a, b, pg_cmp_s32(), and WEP_GETPOS.
Referenced by checkcondition_str(), and uniquePos().
Datum tsvectorin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 178 of file tsvector.c.
References ARRPTR, Assert, buf, CALCDATASIZE, close_tsvector_parser(), cur, elog, WordEntryIN::entry, ereturn, errcode(), errmsg(), ERROR, gettoken_tsvector(), WordEntry::haspos, i, init_tsvector_parser(), WordEntry::len, len, MAXSTRLEN, MAXSTRPOS, palloc(), palloc0(), pfree(), PG_GETARG_CSTRING, PG_RETURN_NULL, PG_RETURN_TSVECTOR, WordEntryIN::pos, WordEntry::pos, WordEntryIN::poslen, repalloc(), SET_VARSIZE, SHORTALIGN, TSVectorData::size, SOFT_ERROR_OCCURRED, STRPTR, tmpbuf, token, and uniqueentry().
Datum tsvectorout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 317 of file tsvector.c.
References ARRPTR, i, WordEntry::len, len, palloc(), pg_database_encoding_max_length(), PG_FREE_IF_COPY, PG_GETARG_TSVECTOR, pg_mblen(), PG_RETURN_CSTRING, WordEntry::pos, POSDATALEN, POSDATAPTR, TSVectorData::size, sprintf, STRPTR, t_iseq, WEP_GETPOS, and WEP_GETWEIGHT.
Datum tsvectorrecv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 449 of file tsvector.c.
References ARRPTR, buf, compareentry(), DATAHDRSIZE, elog, TSVectorData::entries, ERROR, WordEntry::haspos, i, j, WordEntry::len, len, MaxAllocSize, MAXNUMPOS, MAXSTRLEN, MAXSTRPOS, palloc0(), PG_GETARG_POINTER, PG_RETURN_TSVECTOR, WordEntry::pos, POSDATAPTR, pq_getmsgint(), pq_getmsgstring(), qsort_arg(), repalloc(), SET_VARSIZE, SHORTALIGN, TSVectorData::size, STRPTR, WEP_GETPOS, and WordEntryCMP().
Datum tsvectorsend | ( | PG_FUNCTION_ARGS | ) |
Definition at line 410 of file tsvector.c.
References ARRPTR, buf, i, j, WordEntry::len, PG_GETARG_TSVECTOR, PG_RETURN_BYTEA_P, WordEntry::pos, POSDATALEN, POSDATAPTR, pq_begintypsend(), pq_endtypsend(), pq_sendbyte(), pq_sendint16(), pq_sendint32(), pq_sendtext(), TSVectorData::size, and STRPTR.
|
static |
Definition at line 100 of file tsvector.c.
References a, Assert, buf, compareentry(), WordEntryIN::entry, WordEntry::haspos, WordEntry::len, pfree(), WordEntryIN::pos, WordEntry::pos, WordEntryIN::poslen, qsort_arg(), repalloc(), res, SHORTALIGN, and uniquePos().
Referenced by tsvectorin().
|
static |
Definition at line 52 of file tsvector.c.
References a, compareWordEntryPos(), MAXENTRYPOS, MAXNUMPOS, qsort, res, WEP_GETPOS, WEP_GETWEIGHT, and WEP_SETWEIGHT.
Referenced by uniqueentry().
Definition at line 171 of file tsvector.c.
References a, b, buf, and compareentry().
Referenced by tsvectorrecv().