PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "libpq/pqformat.h"
#include "tsearch/ts_locale.h"
#include "tsearch/ts_utils.h"
#include "utils/builtins.h"
#include "utils/memutils.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 83 of file tsvector.c.
References WordEntryIN::entry, WordEntry::len, WordEntry::pos, and tsCompareString().
Referenced by tsvectorrecv(), uniqueentry(), and WordEntryCMP().
int compareWordEntryPos | ( | const void * | a, |
const void * | b | ||
) |
Definition at line 33 of file tsvector.c.
References 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, ereport, errcode(), errmsg(), ERROR, gettoken_tsvector(), WordEntry::haspos, i, init_tsvector_parser(), WordEntry::len, MAXSTRLEN, MAXSTRPOS, palloc(), palloc0(), pfree(), PG_GETARG_CSTRING, PG_RETURN_TSVECTOR, WordEntryIN::pos, WordEntry::pos, WordEntryIN::poslen, repalloc(), SET_VARSIZE, SHORTALIGN, TSVectorData::size, STRPTR, tmpbuf, and uniqueentry().
Datum tsvectorout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 311 of file tsvector.c.
References ARRPTR, i, WordEntry::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 443 of file tsvector.c.
References ARRPTR, buf, compareentry(), DATAHDRSIZE, elog, TSVectorData::entries, ERROR, WordEntry::haspos, i, WordEntry::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 404 of file tsvector.c.
References ARRPTR, buf, i, 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 99 of file tsvector.c.
References Assert, compareentry(), WordEntryIN::entry, WordEntry::haspos, WordEntry::len, pfree(), WordEntryIN::pos, WordEntry::pos, WordEntryIN::poslen, qsort_arg(), repalloc(), SHORTALIGN, and uniquePos().
Referenced by tsvectorin().
|
static |
Definition at line 51 of file tsvector.c.
References compareWordEntryPos(), MAXENTRYPOS, MAXNUMPOS, qsort, WEP_GETPOS, WEP_GETWEIGHT, and WEP_SETWEIGHT.
Referenced by uniqueentry().
Definition at line 171 of file tsvector.c.
References compareentry().
Referenced by tsvectorrecv().