Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it
Дата
Msg-id CA+TgmoZfUJHu-2m-2K4OfX_pOcD=PHuOkTxxjuN-F8WPbZedBw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
On Tue, Jan 8, 2013 at 7:57 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> I was thinking more about a sprintf()-type function that only
>> understands a handful of escapes, but adds the additional and novel
>> escapes %I (quote as identifier) and %L (quote as literal).  I think
>> that would allow a great deal of code simplification, and it'd be more
>> efficient, too.
>
> Seems like a great idea.  Are you offering to code it?

Not imminently.

> Note that this wouldn't entirely fix the fmtId problem, as not all the
> uses of fmtId are directly in sprintf calls.  Still, it might get rid of
> most of the places where it'd be painful to avoid a memory leak with
> a strdup'ing version of fmtId.

Yeah, I didn't think about that.  Might be worth a look to see how
comprehensively it would solve the problem.  But I'll have to leave
that for another day.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it
Следующее
От: Tom Lane
Дата:
Сообщение: Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers