Skip to content

Commit

Permalink
Fix the incorrect string limit when declaring NVARCHAR(Max) (#482)
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 column
size to default -1 (0xffff).

Task: BABEL-5054
Signed-off-by: Chenxiao Wang <[email protected]>
  • Loading branch information
chxwang authored Dec 17, 2024
1 parent dec4c87 commit a0aba15
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 @@ -573,7 +573,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 a0aba15

Please sign in to comment.