Re: OUT parameters in PL/Java
От | Thomas Hallgren |
---|---|
Тема | Re: OUT parameters in PL/Java |
Дата | |
Msg-id | thhal-083I3A4VHySchqCIKpvwpFuaTVJ864B@mailblocks.com обсуждение исходный текст |
Ответ на | Re: OUT parameters in PL/Java (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane wrote: > Thomas Hallgren <thhal@mailblocks.com> writes: > >>I've read about changes in CVS head needed to accomodate OUT parameters. >>I tried to compile PL/Java and it fails (of course). Is there any brief >>text somewhere that highligts the changes that where made and explains >>how the new stuff works? It's hard and somewhat time consuming to try to >>deduct everything just by looking at the code in pl/pgsql. > > > Could you give more details about what problem you are having? Simply > recompiling an existing PL shouldn't fail (of course, it wouldn't know > about OUT parameters either). > My compile failure was due to the change of proargtypes from Oid* to an oidvector. I initially thought that had something to do with OUT parameters. Some diffs on plperl helped me a bit. I found the new get_call_result_type() function. I've made some assumptions that I would like to verify the correctness of: - I assume that by using the get_call_result_type() PL/Java will not need any specific handling of functions returning OUT parameters since they are similar to functions returning a complex type. - The TupleDesc returned by the get_call_result_type() is not always reachable using an Oid. I.e. I cannot use TypeGetTupleDesc(oid, NIL) with the Form_pg_proc.prorettype of my function as the first argument. - The Form_pg_proc.pronargs denotes the number of IN parameters, i.e. its safe to access proargtypes.values[idx] with an idx ranging from 0 to pronargs - 1. Regards, Thomas Hallgren
В списке pgsql-hackers по дате отправления: