Sergej Sergeev wrote:
>
> >Sergej Sergeev <sergej@commandprompt.com> writes:
> >
> >
> >>>What happens if you feed other pseudotypes, like cstring or
> >>>language_handler? Shouldn't that be disallowed or something?
> >>>
> >>>
> >
> >
> >
> >>Other pseudo-types are disallowed (no-change)
> >>
> >>
> >
> >No, because you diked out the check at lines 1452ff, rather than
> >upgrading it to something correct.
> >
> >I find the "fn_retispseudo" and "arg_is_p" flags pretty bogus anyway
> >since they fail to indicate *which* pseudotype it is. You might as
> >well just test for the specific type OID.
> >
> > regards, tom lane
> >
> >
> New patch. I have added the check pseudo-type argumetns.
> Specific type is substituted in runtime, during function call.
I can't apply this patch because the code has changed too much. Would
you regenerate a patch against current CVS?
Also, this indenting seems wrong:
> ! /* Disallow pseudotype argument, except ANYELEMENT or ANYARRAY */
> if (typeStruct->typtype == 'p')
> + if (procStruct->proargtypes[i] == ANYARRAYOID ||
> + procStruct->proargtypes[i] == ANYELEMENTOID)
> + /* okay */
> + prodesc->arg_is_p[i] = true;
> + else
> {
> free(prodesc->proname);
> free(prodesc);
Putting an 'if' after an 'if' is just too strange. Please make a more
complete fix that has proper block indenting.
Also, I don't think the arg_is_p variable is really the proper fix for
this, but I am unsure what to recomment. Others?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073