Function Overloading - Mailing list pgsql-hackers

From ramsiddu007
Subject Function Overloading
Date
Msg-id CA+zEy78T5P9rZ7V6mkkENb_U_bveOy1eOu1S97oWxeTXm86Cmg@mail.gmail.com
Whole thread Raw
Responses Re: Function Overloading  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi Professionals,
            I hope you are all doing good. Actually I got one problem. I have 2 functions like below. Those are having 11 and 14 parameters with commonly last parameter is variadic array type. 
          
func_get_item_list_phy_param(smallint, numeric, numeric, character varying, character varying, character varying, numeric, character varying, integer, integer, character varying[]);

func_get_item_list_phy_param(smallint, numeric, numeric, character varying, character varying, character varying, numeric, character varying, integer, integer, character varying, character varying, character varying, character varying[]);

    Now I have called 14 parameters function like 
select * from epps.func_get_item_list_phy_param('1'::smallint,'1.0'::numeric,'1550.0'::numeric,'HR HOT'::varchar,NULL::varchar,NULL::varchar,'1400.0'::numeric,'192.168.1.29'::varchar,'32272'::int,'119'::int,'c'::varchar,'b'::varchar,'a'::varchar, null)  as result  
  
After that it was showing following error:

HINT:  Could not choose a best candidate function. You might need to add explicit type casts.

After that I have removed variadic input parameter at last then again run. But it's calling 11 parameter procedure.

select * from epps.func_get_item_list_phy_param('1'::smallint,'1.0'::numeric,'1550.0'::numeric,'HR HOT'::varchar,NULL::varchar,NULL::varchar,'1400.0'::numeric,'192.168.1.29'::varchar,'32272'::int,'119'::int,'c'::varchar,'b'::varchar,'a'::varchar)  as result  


Plz give me clarity of actual issue in these cases. 

I hope, I'll get some response from you.

Thanks in advance. 
--
Best Regards:
Ramanna Gunde

pgsql-hackers by date:

Previous
From: Pavel Raiskup
Date:
Subject: Re: Shared PostgreSQL libraries and ABI versioning
Next
From: Marina Polyakova
Date:
Subject: Re: WIP Patch: Precalculate stable functions, infrastructure v1