Skip to content

Commit

Permalink
Fix the incorrect string limit when declaring NVARCHAR(Max) (#504)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
chxwang authored Dec 18, 2024
1 parent fc679ed commit e7eb49e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/utils/adt/jsonpath_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ tsql_openjson_with_columnize(Jsonb *jb, char *col_info)
if (token)
{
token = strtok(NULL, ")");
if (token)
if (token && atoi(token) > 0)
col_size = atoi(token);
}
}
Expand Down

0 comments on commit e7eb49e

Please sign in to comment.