Thread: old-style handler problem

old-style handler problem

From
Sibtay Abbas
Date:
hi everyone

i ve added my own pl language in postgresql. i ve
followed the process mentioned in the documentation.
for the handler function i ve followed the following
template

PG_FUNCTION_INFO_V1(myhandler);

Datum
plsample_call_handler(PG_FUNCTION_ARGS)
{Datum rv;...my code....

return rv;
}

then i created a function using my language...but when
i invoked it later on with SELECT funcName() i
received the following error

ERROR:  language 25450 has old-style handler

why am i getting this message and how can it be
rectified...thank you

    
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 


Re: old-style handler problem

From
Tom Lane
Date:
Sibtay Abbas <sibtay_abbas@yahoo.com> writes:
> for the handler function i ve followed the following
> template

> PG_FUNCTION_INFO_V1(myhandler);                     ^^^^^^^^^
> Datum
> plsample_call_handler(PG_FUNCTION_ARGS) ^^^^^^^^^^^^^^^^^^^^^

Try spelling the function name consistently.
        regards, tom lane


Re: old-style handler problem

From
Christopher Kings-Lynne
Date:
I think you have to use the PG_RETURN_DATUM(rc) style macros...

Sibtay Abbas wrote:
> hi everyone
> 
> i ve added my own pl language in postgresql. i ve
> followed the process mentioned in the documentation.
> for the handler function i ve followed the following
> template
> 
> PG_FUNCTION_INFO_V1(myhandler);
> 
> Datum
> plsample_call_handler(PG_FUNCTION_ARGS)
> {
>     Datum rv;
>     
>     ...my code....
> 
> 
>     return rv;
> }
> 
> then i created a function using my language...but when
> i invoked it later on with SELECT funcName() i
> received the following error
> 
> ERROR:  language 25450 has old-style handler
> 
> why am i getting this message and how can it be
> rectified...thank you
> 
> 
>         
> __________________________________ 
> Do you Yahoo!? 
> Take Yahoo! Mail with you! Get it on your mobile phone. 
> http://mobile.yahoo.com/maildemo 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
>                http://archives.postgresql.org