Re: SPI_psprintf and SPI_pstrdup

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: SPI_psprintf and SPI_pstrdup
Дата
Msg-id 200704242308.57838.peter_e@gmx.net
обсуждение исходный текст
Ответ на SPI_psprintf and SPI_pstrdup  (Jacob Rief <jacob.rief@gmx.at>)
Список pgsql-patches
Jacob Rief wrote:
> char *SPI_psprintf(const char *fmt, ...);
> allocates a block of memory out of the memory pool and prints a
> formatted string into it

Such matters are best solved using the StringInfo API.

> SPI_pstrdup(const char *src);
> allocates a block of memory out of the memory pool and copies an
> existing string into it.

How is that different from pstrdup()?

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

В списке pgsql-patches по дате отправления:

Предыдущее
От: Jacob Rief
Дата:
Сообщение: SPI_psprintf and SPI_pstrdup
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SPI_psprintf and SPI_pstrdup