pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Praveen Kumar <praveenkumar52028@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15057: Issue with UNKNOW type when calling a PostgreSQL function from java code
Date: Sat, 10 Feb 2018 11:48:17 +0000
Message-ID: <87sha9rs41.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <CAG2WJO3QDnQg+MquwpoOMJzpxz60=oQE=7kpDhR7hg=TR_RfoA@mail.gmail.com>
References: <151824945389.9456.1263445998324211651@wrigleys.postgresql.org>
<87wozlrwmc.fsf@news-spur.riddles.org.uk>
<CAG2WJO3QDnQg+MquwpoOMJzpxz60=oQE=7kpDhR7hg=TR_RfoA@mail.gmail.com>
>>>>> "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)
view thread (19+ messages) latest in thread
Message-ID: <87sha9rs41.fsf@news-spur.riddles.org.uk> Permalink: ../87sha9rs41.fsf@news-spur.riddles.org.uk/ Also on: postgresql.org/message-id/87sha9rs41.fsf@news-spur.riddles.org.uk ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-bugs@postgresql.org Cc: andrew@tao11.riddles.org.uk, praveenkumar52028@gmail.com Subject: Re: BUG #15057: Issue with UNKNOW type when calling a PostgreSQL function from java code In-Reply-To: <87sha9rs41.fsf@news-spur.riddles.org.uk> References: <151824945389.9456.1263445998324211651@wrigleys.postgresql.org> <87wozlrwmc.fsf@news-spur.riddles.org.uk> <CAG2WJO3QDnQg+MquwpoOMJzpxz60=oQE=7kpDhR7hg=TR_RfoA@mail.gmail.com> <87sha9rs41.fsf@news-spur.riddles.org.uk> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox