> -----Original Message-----
> From: Tom Lane
>
> Modified Files:
> fcache.c
>
> ----------------------------- Log Message -----------------------------
>
> Remove 'func_tlist' from Func expression nodes, likewise 'param_tlist'
> from Param nodes, per discussion a few days ago on pghackers. Add new
> expression node type FieldSelect that implements the functionality where
> it's actually needed. Clean up some other unused fields in Func nodes
> as well.
> NOTE: initdb forced due to change in stored expression trees for rules.
>
I see the following Assert in GetDynamicFuncArgType().
/* TEST: I bet this routine is unnecessary ... */
Assert(arg->vartype == tup->t_data->t_oid);
Seems the Assert() fails in misc regression test at
SELECT p.name, p.hobbies.name FROM person* p;.
etc ...(pararell regression test invokes postmaster without -A
option unfortunately).
The definition of hobbies() is as follows.
CREATE FUNCTION hobbies(person)
RETURNS setof hobbies_r
AS 'select * from hobbies_r where person = $1.name'
LANGUAGE 'sql';
When a subclass of person is passed to the hobbies() function
the Assert() seems to fail.
In additon this example gives me some other questions.
1) Could PL/pgSQL functions handle input tuple parameter
properly when the class of the tuple has subclasses ?
2) Could functions return multiple subclasses when returning
(setof) tuple(s) ?
If so,could FieldSelect Nodes handle such cases properly ?
Regards.
Hiroshi Inoue