From 022417740094620880488dd9b04fbb96ff11694b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 7 Aug 2000 20:16:13 +0000 Subject: TOAST mop-up work: update comments for tuple-size-related symbols such as MaxHeapAttributeNumber. Increase MaxAttrSize to something more reasonable (given what it's used for, namely checking char(n) declarations, I didn't make it the full 1G that it could theoretically be --- 10Mb seemed a more reasonable number). Improve calculation of MaxTupleSize. --- src/interfaces/ecpg/preproc/preproc.y | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/interfaces') diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index d45322ac17..0d12a10b8e 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -3114,12 +3114,13 @@ Bit: bit '(' Iconst ')' if (atol($3) < 1) { sprintf(errortext,"length for type '%s' must be at least 1",$1); - mmerror(ET_ERROR, errortext); + mmerror(ET_ERROR, errortext); } - else if (atol($3) > (MaxAttrSize *sizeof(char))) + else if (atol($3) > (MaxAttrSize * BITSPERBYTE)) { - sprintf(errortext, "length for type '%s' cannot exceed %ld", $1, - (MaxAttrSize * sizeof(char))); + sprintf(errortext, "length for type '%s' cannot exceed %d", $1, + (MaxAttrSize * BITSPERBYTE)); + mmerror(ET_ERROR, errortext); } } | bit @@ -3147,7 +3148,7 @@ Character: character '(' Iconst ')' } else if (atol($3) > MaxAttrSize) { - sprintf(errortext, "length for type '%s' cannot exceed %ld", $1, MaxAttrSize); + sprintf(errortext, "length for type '%s' cannot exceed %d", $1, MaxAttrSize); mmerror(ET_ERROR, errortext); } -- cgit v1.2.1