Re: Returning Composite Types from C functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Returning Composite Types from C functions
Дата
Msg-id 12670.1119104089@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Returning Composite Types from C functions  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-hackers
Michael Fuhr <mike@fuhr.org> writes:
> Maybe one of the developers can comment on why your example calls
> the function only once and mine calls it multiple times per row,
> even though they look similar.

Look at the EXPLAIN results --- one case gets flattened into a single
plan node and the other doesn't.  I know exactly where that particular
skeleton is buried, too:
/* * Hack: don't try to pull up a subquery with an empty jointree. * query_planner() will correctly generate a Result
planfor a * jointree that's totally empty, but I don't think the right things * happen if an empty FromExpr appears
lowerdown in a jointree. Not * worth working hard on this, just to collapse SubqueryScan/Result * into Result... */if
(subquery->jointree->fromlist== NIL)    return false;
 

        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] default database creation with initdb
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] Escape handling in strings