Re: BUG #15057: Issue with UNKNOW type when calling a PostgreSQL function from java code - Mailing list pgsql-bugs

From Andrew Gierth
Subject Re: BUG #15057: Issue with UNKNOW type when calling a PostgreSQL function from java code
Date
Msg-id 87sha9rs41.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: BUG #15057: Issue with UNKNOW type when calling a PostgreSQL function from java code  (Praveen Kumar <praveenkumar52028@gmail.com>)
Responses Re: BUG #15057: Issue with UNKNOW type when calling a PostgreSQL function from java code  (Praveen Kumar <praveenkumar52028@gmail.com>)
List pgsql-bugs
>>>>> "Praveen" == Praveen Kumar <praveenkumar52028@gmail.com> writes:

 Praveen> [image: Inline image 2]

In future please use text rather than screenshots, so that you can
include the complete list rather than just a small part.

 Praveen> While calling one of these DECODE functions from my existing
 Praveen> select query,I am seeing an error saying

 Praveen> decode(numeric,integer,unknown,unknow) is not available

Because you didn't include the complete list of function signatures in
your message, we're left with the fact that the ones you _did_ show all
start out with anyelement,anyelement. Since polymorphic function
resolution requires all "anyelement" matches to be of the _same_ type,
it's clear that none of these can match a call which has numeric,integer
as the first two parameters.

Even if you changed your second parameter to be numeric rather than
integer, you'd then be faced with the fact that the list of signatures
contains at least these:

 decode(anyelement,anyelement,bigint,bigint)
 decode(anyelement,anyelement,character,character)
 decode(anyelement,anyelement,date,date)

So how would postgres be able to tell, given an argument list with types
(numeric,numeric,unknown,unknown), which of these signatures to use?
Obviously it would be ambiguous.

-- 
Andrew (irc:RhodiumToad)


pgsql-bugs by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: BUG #15057: Issue with UNKNOW type when calling a PostgreSQL function from java code
Next
From: Peter Geoghegan
Date:
Subject: Re: BUG #15026: Deadlock using GIST index