BUG #11266: failed to find conversion function from unknown to bigint

Поиск
Список
Период
Сортировка
От zoulx1982@163.com
Тема BUG #11266: failed to find conversion function from unknown to bigint
Дата
Msg-id 20140826062110.2532.26317@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #11266: failed to find conversion function from unknown to bigint  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #11264: Auto vacuum wraparound job blocking everything
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #11266: failed to find conversion function from unknown to bigint