From: zoulx1982@163.com
To: pgsql-bugs@postgresql.org
Subject: BUG #11266: failed to find conversion function from unknown to bigint
Date: Tue, 26 Aug 2014 06:21:10 +0000
Message-ID: <20140826062110.2532.26317@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 11266
Logged by: zoulx1982
Email address: zoulx1982@163.com
PostgreSQL version: 9.4beta2
Operating system: Win7
Description:
when i migrate my application from oracle to postgrs,
i encounter a query raise error "failed to find conversion function from
unknown to bigint"
the original query is very complicated, so i summarize a simple testcase:
create table t1(a varchar(10));
create table t2(x varchar(10), y bigint);
select s.*
from
(select a, null b from t1
group by a
) s
union all
select x,y from t2;--ERROR
postgres=# select version();
version
----------------------------------------------------------------
PostgreSQL 9.5devel, compiled by Visual C++ build 1600, 32-bit
(1 row)
and when i remove the "group" clause, the query works well
or if i don't use sub-query, it can also work well, i.e.
select a, null b from t1 group by a union all select x,y from t2;
and
select s.* from (select a, null b from t1) s union all select x,y from t2;
is all OK.
is there parameters to avoid the issue without changing original sql,
or doe's somebody can fix the issue later ?
thanks.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: zoulx1982@163.com
Subject: Re: BUG #11266: failed to find conversion function from unknown to bigint
In-Reply-To: <20140826062110.2532.26317@wrigleys.postgresql.org>
References: <20140826062110.2532.26317@wrigleys.postgresql.org>
* 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