X-Git-Url: http://git.sourceforge.jp/view?p=pgbigm%2Fpg_bigm.git;a=blobdiff_plain;f=bigm_op.c;h=713c9991010df071fbcc31ea46de04d0740fc476;hp=0b5c989ded87abbcdb9aa74d6c25c7d23d54ef59;hb=HEAD;hpb=9cad26e6e72b66c27b691bf1271d29b7387233ab diff --git a/bigm_op.c b/bigm_op.c index 0b5c989..5ee4e6d 100644 --- a/bigm_op.c +++ b/bigm_op.c @@ -1,7 +1,8 @@ /*------------------------------------------------------------------------- * - * Portions Copyright (c) 2004-2012, PostgreSQL Global Development Group + * Portions Copyright (c) 2017-2023, 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 @@ -19,12 +20,15 @@ #include "catalog/pg_type.h" #include "tsearch/ts_locale.h" #include "utils/array.h" +#if PG_VERSION_NUM >= 160000 +#include "utils/guc.h" +#endif /* PG_VERSION_NUM */ #include "utils/memutils.h" 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; @@ -707,25 +711,6 @@ likequery(PG_FUNCTION_ARGS) 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) {