mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Add more use of psprintf()
This commit is contained in:
@ -73,8 +73,7 @@ complex_out(PG_FUNCTION_ARGS)
|
||||
Complex *complex = (Complex *) PG_GETARG_POINTER(0);
|
||||
char *result;
|
||||
|
||||
result = (char *) palloc(100);
|
||||
snprintf(result, 100, "(%g,%g)", complex->x, complex->y);
|
||||
result = psprintf("(%g,%g)", complex->x, complex->y);
|
||||
PG_RETURN_CSTRING(result);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user