mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Make use of psprintf() in recent changes
This commit is contained in:
@ -1010,16 +1010,12 @@ Datum
|
||||
line_out(PG_FUNCTION_ARGS)
|
||||
{
|
||||
LINE *line = PG_GETARG_LINE_P(0);
|
||||
char *buf;
|
||||
int ndig = DBL_DIG + extra_float_digits;
|
||||
|
||||
if (ndig < 1)
|
||||
ndig = 1;
|
||||
|
||||
buf = palloc(ndig * 3 + 5);
|
||||
sprintf(buf, "{%.*g,%.*g,%.*g}", ndig, line->A, ndig, line->B, ndig, line->C);
|
||||
|
||||
PG_RETURN_CSTRING(buf);
|
||||
PG_RETURN_CSTRING(psprintf("{%.*g,%.*g,%.*g}", ndig, line->A, ndig, line->B, ndig, line->C));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user