From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org> |
Cc: | John Hansen <john(at)geeknet(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Returning Composite Types from C functions |
Date: | 2005-06-18 14:14:49 |
Message-ID: | 12670.1119104089@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Michael Fuhr <mike(at)fuhr(dot)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 plan for a
* jointree that's totally empty, but I don't think the right things
* happen if an empty FromExpr appears lower down 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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-06-18 14:20:07 | Re: [PATCHES] Escape handling in strings |
Previous Message | Tom Lane | 2005-06-18 14:12:02 | Re: [PATCHES] default database creation with initdb |