Re: plperl features

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Sergej Sergeev <sergej(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: plperl features
Date: 2005-06-10 01:19:46
Message-ID: 200506100119.j5A1JkW15292@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Sergej Sergeev wrote:
>
> >Sergej Sergeev <sergej(at)commandprompt(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2005-06-10 01:31:49 Re: final light versions of Oracle compatibility (SQLSTATE,
Previous Message Bruce Momjian 2005-06-09 23:27:47 Re: Show full path name when saving in psql