Re: Reasons not to like asprintf
| От | Stephen Frost |
|---|---|
| Тема | Re: Reasons not to like asprintf |
| Дата | |
| Msg-id | 20131022175651.GZ2706@tamriel.snowman.net обсуждение исходный текст |
| Ответ на | Reasons not to like asprintf (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Reasons not to like asprintf
|
| Список | pgsql-hackers |
Tom,
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> In short, I want to change pg_asprintf to return the malloc'd buffer
> as its function result. This probably means we should change the
> function name too, since the allusion to asprintf is completely useless
> if we do that. I'm thinking pg_psprintf for the frontend version of
> psprintf, but maybe somebody has a better suggestion?
Sounds reasonable, and I haven't got a better name, but I'm trying to
figure out why psprintf hasn't got the same issues which you mention in
your other thread (eg: depending on vsnprintf to return the "would-be"
result size). I'm also a bit nervous that we only check vsnprintf()
success in Assert-enabled builds in psprintf, though I suppose that's
all we're doing in appendStringInfo too.
Thanks,
Stephen
В списке pgsql-hackers по дате отправления: