Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/backend/utils/adt/agtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -6210,7 +6210,6 @@ Datum age_tostringlist(PG_FUNCTION_ARGS)
agtype_value string_elem;
int count;
int i;
float float_num;
char buffer[64];

/* check for null */
Expand Down Expand Up @@ -6263,8 +6262,7 @@ Datum age_tostringlist(PG_FUNCTION_ARGS)
break;

case AGTV_FLOAT:

float_num = elem->val.float_value;

sprintf(buffer, "%.*g", DBL_DIG, elem->val.float_value);
string_elem.val.string.val = pstrdup(buffer);
string_elem.val.string.len = strlen(buffer);
Expand All @@ -6275,7 +6273,7 @@ Datum age_tostringlist(PG_FUNCTION_ARGS)

case AGTV_INTEGER:

sprintf(buffer, "%d", elem->val.int_value);
sprintf(buffer, "%ld", elem->val.int_value);
string_elem.val.string.val = pstrdup(buffer);
string_elem.val.string.len = strlen(buffer);

Expand Down