Skip to content

Commit 6001175

Browse files
chxwangANJU BHARTI
authored andcommitted
Fix the incorrect string limit when declaring NVARCHAR(Max) (#504)
Previously, the limit on the max length of NVARCHAR(Max) was 4000, longer characters will be truncated. But NVARCHAR(MAX) should be capable of handling strings far longer than 4,000 characters. This pr change the col_size to default INT_MAX. Task: BABEL-5054 Signed-off-by: Chenxiao Wang <chxwang@amazon.com>
1 parent d16ffee commit 6001175

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/backend/utils/adt/jsonpath_exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ tsql_openjson_with_columnize(Jsonb *jb, char *col_info)
705705
if (token)
706706
{
707707
token = strtok(NULL, ")");
708-
if (token)
708+
if (token && atoi(token) > 0)
709709
col_size = atoi(token);
710710
}
711711
}

0 commit comments

Comments
 (0)