Re: [GENERAL] Many Pl/PgSQL parameters -> AllocSetAlloc(128)?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Many Pl/PgSQL parameters -> AllocSetAlloc(128)?
Дата
Msg-id 19367.1056466269@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] Many Pl/PgSQL parameters -> AllocSetAlloc(128)?  (Joe Conway <mail@joeconway.com>)
Ответы Re: [GENERAL] Many Pl/PgSQL parameters -> AllocSetAlloc(128)?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> Actually, adding a "pfree(oneres);" to the end of that for loop plugs
> the memory leak and allows me to see the error message:

On second look, you can't pfree oneres at the bottom of
gen_cross_product() because it's part of the returned data structure
--- note the assignment
        *iter++ = oneres;

I think the bug here is that gen_cross_product should be ignoring
argument positions that have nsupers == 0; those should always be
assigned the same type as the input, since the regular type resolution
algorithm is responsible for dealing with 'em.

It might work to get rid of the "wild card" case (line 1115), which'd
reduce the number of outputs to product(nsupers+1).  I doubt we really
want any wild cards in there anymore.

            regards, tom lane

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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: interval's and printing...
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: lru cache replacement