Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XMHN1-0007sl-HH for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Aug 2014 14:05:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XMHN0-0008Rp-Se for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Aug 2014 14:05:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XMA90-00016h-PP for pgsql-bugs@postgresql.org; Tue, 26 Aug 2014 06:22:14 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XMA8s-0007XS-GV for pgsql-bugs@postgresql.org; Tue, 26 Aug 2014 06:22:13 +0000 MIME-Version: 1.0 Subject: BUG #11266: failed to find conversion function from unknown to bigint To: pgsql-bugs@postgresql.org From: zoulx1982@163.com Date: Tue, 26 Aug 2014 06:21:10 +0000 Message-ID: <20140826062110.2532.26317@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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