PostgreSQL Source Code git master
|
#include "postgres.h"
#include <ctype.h>
#include "crc32.h"
#include "libpq/pqformat.h"
#include "ltree.h"
#include "miscadmin.h"
#include "nodes/miscnodes.h"
#include "varatt.h"
Go to the source code of this file.
Data Structures | |
struct | NODE |
struct | QPRS_STATE |
struct | INFIX |
Macros | |
#define | WAITOPERAND 1 |
#define | INOPERAND 2 |
#define | WAITOPERATOR 3 |
#define | STACKDEPTH 32 |
#define | RESIZEBUF(inf, addsize) |
Typedefs | |
typedef struct NODE | NODE |
Functions | |
static int32 | gettoken_query (QPRS_STATE *state, int32 *val, int32 *lenval, char **strval, uint16 *flag) |
static bool | pushquery (QPRS_STATE *state, int32 type, int32 val, int32 distance, int32 lenval, uint16 flag) |
static bool | pushval_asis (QPRS_STATE *state, int type, char *strval, int lenval, uint16 flag) |
static int32 | makepol (QPRS_STATE *state) |
static void | findoprnd (ITEM *ptr, int32 *pos) |
static ltxtquery * | queryin (char *buf, struct Node *escontext) |
PG_FUNCTION_INFO_V1 (ltxtq_in) | |
Datum | ltxtq_in (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (ltxtq_recv) | |
Datum | ltxtq_recv (PG_FUNCTION_ARGS) |
static void | infix (INFIX *in, bool first) |
PG_FUNCTION_INFO_V1 (ltxtq_out) | |
Datum | ltxtq_out (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (ltxtq_send) | |
Datum | ltxtq_send (PG_FUNCTION_ARGS) |
#define INOPERAND 2 |
Definition at line 20 of file ltxtquery_io.c.
#define RESIZEBUF | ( | inf, | |
addsize | |||
) |
Definition at line 458 of file ltxtquery_io.c.
#define STACKDEPTH 32 |
Definition at line 209 of file ltxtquery_io.c.
#define WAITOPERAND 1 |
Definition at line 19 of file ltxtquery_io.c.
#define WAITOPERATOR 3 |
Definition at line 21 of file ltxtquery_io.c.
Definition at line 298 of file ltxtquery_io.c.
References check_stack_depth(), findoprnd(), ITEM::left, type, VAL, val, and VALTRUE.
Referenced by findoprnd(), and queryin().
|
static |
Definition at line 61 of file ltxtquery_io.c.
References CLOSE, END, ereturn, ERR, errcode(), errmsg(), flag(), INOPERAND, ISLABEL, LVAR_ANYEND, LVAR_INCASE, LVAR_SUBLEXEME, OPEN, OPR, pg_mblen(), t_iseq, VAL, val, WAITOPERAND, and WAITOPERATOR.
Referenced by makepol().
|
static |
Definition at line 472 of file ltxtquery_io.c.
References INFIX::buf, INFIX::buflen, check_stack_depth(), INFIX::cur, INFIX::curpol, ITEM::distance, ITEM::flag, infix(), ITEM::length, LVAR_ANYEND, LVAR_INCASE, LVAR_SUBLEXEME, INFIX::op, OPR, palloc(), pfree(), RESIZEBUF, sprintf, ITEM::type, ITEM::val, and VAL.
Referenced by infix(), ltxtq_out(), and ltxtq_send().
Datum ltxtq_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 409 of file ltxtquery_io.c.
References PG_GETARG_POINTER, PG_RETURN_NULL, PG_RETURN_POINTER, queryin(), and res.
Datum ltxtq_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 572 of file ltxtquery_io.c.
References INFIX::buf, INFIX::buflen, INFIX::cur, INFIX::curpol, ereport, errcode(), errdetail(), errmsg(), ERROR, GETOPERAND, GETQUERY, infix(), INFIX::op, palloc(), PG_GETARG_LTXTQUERY_P, PG_RETURN_POINTER, and ltxtquery::size.
Datum ltxtq_recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 428 of file ltxtquery_io.c.
References buf, elog, ERROR, pfree(), PG_GETARG_POINTER, PG_RETURN_POINTER, pq_getmsgint(), pq_getmsgtext(), queryin(), res, and str.
Datum ltxtq_send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 603 of file ltxtquery_io.c.
References INFIX::buf, buf, INFIX::buflen, INFIX::cur, INFIX::curpol, ereport, errcode(), errdetail(), errmsg(), ERROR, GETOPERAND, GETQUERY, infix(), INFIX::op, palloc(), pfree(), PG_GETARG_LTXTQUERY_P, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), pq_sendint8(), pq_sendtext(), and ltxtquery::size.
|
static |
Definition at line 214 of file ltxtquery_io.c.
References check_stack_depth(), CLOSE, elog, END, ereturn, ERR, errcode(), errmsg(), ERROR, flag(), gettoken_query(), makepol(), OPEN, OPR, pushquery(), pushval_asis(), SOFT_ERROR_OCCURRED, STACKDEPTH, type, VAL, and val.
PG_FUNCTION_INFO_V1 | ( | ltxtq_in | ) |
PG_FUNCTION_INFO_V1 | ( | ltxtq_out | ) |
PG_FUNCTION_INFO_V1 | ( | ltxtq_recv | ) |
PG_FUNCTION_INFO_V1 | ( | ltxtq_send | ) |
|
static |
Definition at line 155 of file ltxtquery_io.c.
References NODE::distance, ereturn, errcode(), errmsg(), NODE::flag, flag(), NODE::length, NODE::next, palloc(), NODE::type, type, NODE::val, and val.
Referenced by makepol(), and pushval_asis().
|
static |
Definition at line 182 of file ltxtquery_io.c.
References ereturn, errcode(), errmsg(), flag(), ltree_crc32_sz(), pushquery(), repalloc(), and type.
Referenced by makepol().
Definition at line 331 of file ltxtquery_io.c.
References buf, COMPUTESIZE, cur, ITEM::distance, ereturn, ERR, errcode(), errdetail(), errmsg(), findoprnd(), ITEM::flag, state::flag, GETOPERAND, GETQUERY, i, ITEM::length, LTXTQUERY_TOO_BIG, makepol(), state::next, palloc(), palloc0(), pfree(), SET_VARSIZE, ltxtquery::size, ITEM::type, ITEM::val, and WAITOPERAND.
Referenced by ltxtq_in(), and ltxtq_recv().