Re: BUG #15057: Issue with UNKNOW type when calling a PostgreSQL function from java code

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Praveen Kumar <praveenkumar52028(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15057: Issue with UNKNOW type when calling a PostgreSQL function from java code
Date: 2018-02-12 11:03:04
Message-ID: 87a7weschp.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>>>>> "Praveen" == Praveen Kumar <praveenkumar52028(at)gmail(dot)com> writes:

Praveen> ERROR: function decode(numeric, integer, unknown, unknown) does not exist
Praveen> LINE 1: select decode(lotid,1,'Lot Id Found','Lot Id not found') fro...
Praveen> ^
Praveen> HINT: No function matches the given name and argument types. You might
Praveen> need to add explicit type casts.

I can't reproduce that:

create function decode(anyelement,anyelement,text,text) returns void
language plpgsql
as $$
begin
raise info 'decode(anyelement,anyelement,text,text)';
end;
$$;
create function decode(numeric,integer,text,text) returns void
language plpgsql
as $$
begin
raise info 'decode(numeric,integer,text,text)';
end;
$$;

select decode(1::numeric, 1, 'foo', 'bar');
INFO: decode(numeric,integer,text,text)

Please show a COMPLETELY SELF-CONTAINED test case.

--
Andrew (irc:RhodiumToad)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2018-02-12 12:59:04 BUG #15060: Row in table not found when using pg function in an expression
Previous Message Praveen Kumar 2018-02-12 10:09:45 Re: BUG #15057: Issue with UNKNOW type when calling a PostgreSQL function from java code