PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <ctype.h>
#include "catalog/pg_collation.h"
#include "ltree.h"
#include "miscadmin.h"
#include "utils/array.h"
#include "utils/formatting.h"
Go to the source code of this file.
Macros | |
#define | NEXTVAL(x) ( (lquery*)( (char*)(x) + INTALIGN( VARSIZE(x) ) ) ) |
Functions | |
PG_FUNCTION_INFO_V1 (ltq_regex) | |
PG_FUNCTION_INFO_V1 (ltq_rregex) | |
PG_FUNCTION_INFO_V1 (lt_q_regex) | |
PG_FUNCTION_INFO_V1 (lt_q_rregex) | |
static char * | getlexeme (char *start, char *end, int *len) |
bool | compare_subnode (ltree_level *t, char *qn, int len, int(*cmpptr)(const char *, const char *, size_t), bool anyend) |
int | ltree_strncasecmp (const char *a, const char *b, size_t s) |
static bool | checkLevel (lquery_level *curq, ltree_level *curt) |
static bool | checkCond (lquery_level *curq, int qlen, ltree_level *curt, int tlen) |
Datum | ltq_regex (PG_FUNCTION_ARGS) |
Datum | ltq_rregex (PG_FUNCTION_ARGS) |
Datum | lt_q_regex (PG_FUNCTION_ARGS) |
Datum | lt_q_rregex (PG_FUNCTION_ARGS) |
Definition at line 22 of file lquery_op.c.
|
static |
Definition at line 136 of file lquery_op.c.
References CHECK_FOR_INTERRUPTS, check_stack_depth(), checkLevel(), lquery_level::flag, lquery_level::high, LEVEL_NEXT, lquery_level::low, LQL_COUNT, LQL_NEXT, and lquery_level::numvar.
Referenced by ltq_regex().
|
static |
Definition at line 99 of file lquery_op.c.
References compare_subnode(), lquery_variant::flag, lquery_level::flag, i, ltree_level::len, lquery_variant::len, LQL_FIRST, LQL_NOT, ltree_strncasecmp(), LVAR_ANYEND, LVAR_INCASE, LVAR_NEXT, LVAR_SUBLEXEME, ltree_level::name, lquery_variant::name, lquery_level::numvar, and success.
Referenced by checkCond().
bool compare_subnode | ( | ltree_level * | t, |
char * | qn, | ||
int | len, | ||
int(*)(const char *, const char *, size_t) | cmpptr, | ||
bool | anyend | ||
) |
Definition at line 44 of file lquery_op.c.
References getlexeme(), ltree_level::len, len, and ltree_level::name.
Referenced by checkcondition_str(), and checkLevel().
|
static |
Definition at line 25 of file lquery_op.c.
References len, pg_mblen(), start, and t_iseq.
Referenced by compare_subnode().
Datum lt_q_regex | ( | PG_FUNCTION_ARGS | ) |
Definition at line 239 of file lquery_op.c.
References ARR_DATA_PTR, ARR_DIMS, ARR_NDIM, array_contains_nulls(), ArrayGetNItems(), DatumGetBool(), DirectFunctionCall2, ereport, errcode(), errmsg(), ERROR, ltq_regex(), NEXTVAL, PG_FREE_IF_COPY, PG_GETARG_ARRAYTYPE_P, PG_GETARG_LTREE_P, PG_RETURN_BOOL, PointerGetDatum(), res, and tree.
Referenced by lt_q_rregex(), and ltree_consistent().
Datum lt_q_rregex | ( | PG_FUNCTION_ARGS | ) |
Definition at line 275 of file lquery_op.c.
References DirectFunctionCall2, lt_q_regex(), PG_GETARG_DATUM, and PG_RETURN_DATUM.
Datum ltq_regex | ( | PG_FUNCTION_ARGS | ) |
Definition at line 215 of file lquery_op.c.
References checkCond(), LQUERY_FIRST, LTREE_FIRST, lquery::numlevel, PG_FREE_IF_COPY, PG_GETARG_LQUERY_P, PG_GETARG_LTREE_P, PG_RETURN_BOOL, res, and tree.
Referenced by _lt_q_regex(), _ltq_extract_regex(), _ltq_regex(), lt_q_regex(), ltq_rregex(), and ltree_consistent().
Datum ltq_rregex | ( | PG_FUNCTION_ARGS | ) |
Definition at line 230 of file lquery_op.c.
References DirectFunctionCall2, ltq_regex(), PG_GETARG_DATUM, and PG_RETURN_DATUM.
int ltree_strncasecmp | ( | const char * | a, |
const char * | b, | ||
size_t | s | ||
) |
Definition at line 78 of file lquery_op.c.
References a, b, pfree(), res, and str_tolower().
Referenced by checkcondition_str(), and checkLevel().
PG_FUNCTION_INFO_V1 | ( | lt_q_regex | ) |
PG_FUNCTION_INFO_V1 | ( | lt_q_rregex | ) |
PG_FUNCTION_INFO_V1 | ( | ltq_regex | ) |
PG_FUNCTION_INFO_V1 | ( | ltq_rregex | ) |