/*-------------------------------------------------------------------------
*
- * Portions Copyright (c) 2004-2012, PostgreSQL Global Development Group
+ * Portions Copyright (c) 2017-2020, pg_bigm Development Group
* Portions Copyright (c) 2013-2016, NTT DATA Corporation
+ * Portions Copyright (c) 2004-2012, PostgreSQL Global Development Group
*
* Changelog:
* 2013/01/09
PG_MODULE_MAGIC;
/* Last update date of pg_bigm */
-#define BIGM_LAST_UPDATE "2015.09.10"
+#define BIGM_LAST_UPDATE "2020.02.28"
/* GUC variable */
bool bigm_enable_recheck = false;
}
/*
- * Extract the next non-wildcard part of a search string, ie, a word bounded
+ * Extract the next non-wildcard part of a search string, i.e. a word bounded
* by '_' or '%' meta-characters, non-word characters or string end.
*
* str: source string, of length lenstr bytes (need not be null-terminated)
PG_RETURN_TEXT_P(result);
}
-inline int
-bigmstrcmp(char *arg1, int len1, char *arg2, int len2)
-{
- int i;
- int len = Min(len1, len2);
-
- for (i = 0; i < len; i++, arg1++, arg2++)
- {
- if (*arg1 == *arg2)
- continue;
- if (*arg1 < *arg2)
- return -1;
- else
- return 1;
- }
-
- return (len1 == len2) ? 0 : ((len1 < len2) ? -1 : 1);
-}
-
Datum
bigmtextcmp(PG_FUNCTION_ARGS)
{