74#define GETCHAR(t, locale) MATCH_LOWER(t, locale)
76#define GETCHAR(t, locale) (t)
83 if (plen == 1 && *p ==
'%')
97 while (tlen > 0 && plen > 0)
106 (
errcode(ERRCODE_INVALID_ESCAPE_SEQUENCE),
107 errmsg(
"LIKE pattern must not end with escape character")));
168 (
errcode(ERRCODE_INVALID_ESCAPE_SEQUENCE),
169 errmsg(
"LIKE pattern must not end with escape character")));
227 found_escape =
false;
236 (
errcode(ERRCODE_INVALID_ESCAPE_SEQUENCE),
237 errmsg(
"LIKE pattern must not end with escape character")));
239 else if (*p1 ==
'_' || *p1 ==
'%')
253 for (
const char *
c = p;
c < p1;
c++)
374 while (plen > 0 && *p ==
'%')
436 (
errcode(ERRCODE_INVALID_ESCAPE_SEQUENCE),
437 errmsg(
"invalid escape string"),
438 errhint(
"Escape string must be empty or one character.")));
459 if (
CHAREQ(p,
e) && !afterescape)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define CopyAdvChar(dst, src, srclen)
#define NextByte(p, plen)
#define NextChar(p, plen)
static int MatchText(const char *t, int tlen, const char *p, int plen, pg_locale_t locale)
#define GETCHAR(t, locale)
void pfree(void *pointer)
#define CHECK_FOR_INTERRUPTS()
int pg_strncoll(const char *arg1, ssize_t len1, const char *arg2, ssize_t len2, pg_locale_t locale)
static int cmp(const chr *x, const chr *y, size_t len)
void check_stack_depth(void)
#define SET_VARSIZE(PTR, len)
#define VARSIZE_ANY_EXHDR(PTR)