1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-04 20:11:56 +03:00

Fix to prevent too large tuple from being created.

This commit is contained in:
Bruce Momjian
1999-07-03 00:33:04 +00:00
parent 954e466c27
commit 97dfff832c
11 changed files with 46 additions and 40 deletions

View File

@@ -3,6 +3,9 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "postgres.h"
#include "access/htup.h"
#include "catalog/catname.h"
#include "utils/numeric.h"
@@ -3351,8 +3354,8 @@ Character: character '(' Iconst ')'
sprintf(errortext, "length for '%s' type must be at least 1",$1);
yyerror(errortext);
}
else if (atol($3) > BLCKSZ - 128) {
sprintf(errortext, "length for type '%s' cannot exceed %d",$1,BLCKSZ - 128);
else if (atol($3) > MaxTupleSize) {
sprintf(errortext, "length for type '%s' cannot exceed %d",$1,MaxTupleSize);
yyerror(errortext);
}