From: MasaoFujii Date: Wed, 18 Mar 2015 20:24:10 +0000 (+0900) Subject: Use INT8 to store the byte length of bi-gram string in "bigm" struct. X-Git-Tag: v1.0-20150910~17 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a88df0d0fad1db164f68dcbeaec47f144c18ae11;p=pgbigm%2Fpg_bigm.git Use INT8 to store the byte length of bi-gram string in "bigm" struct. "bigm" struct has the field "bytelen" which indicates the byte length of bi-gram string. Previously the data type of that field was INT. This commit changes the data type to INT8 because the byte length of bi-gram string is eight bytes at most and INT8 is enough large to indicate that length. This change is useful to increase the maximum allowed size of the column indexed by pg_bigm. This change is cost-effective, i.e., simple but can alleviate the limitation of the column size very much. So per discussion we decided to back-patch this to all supported versions. Beena Emerson, original idea from Sawada Masahiko. --- diff --git a/bigm.h b/bigm.h index eba73c1..578700f 100644 --- a/bigm.h +++ b/bigm.h @@ -32,7 +32,7 @@ extern char *bigm_last_update; typedef struct { bool pmatch; /* partial match is required? */ - int bytelen; /* byte length of bi-gram string */ + int8 bytelen; /* byte length of bi-gram string */ /* * Bi-gram string; we assume here that the maximum bytes for a character