Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bs6PG-0006ZF-JT for pgsql-sql@arkaria.postgresql.org; Thu, 06 Oct 2016 11:00:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bs6PF-0000yC-DK for pgsql-sql@arkaria.postgresql.org; Thu, 06 Oct 2016 11:00:05 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bs6PE-0000xe-Ew; Thu, 06 Oct 2016 11:00:04 +0000 Received: from mail.heales.com ([109.235.147.222] helo=hmmailserver2.com) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bs6PA-0003Tx-UT; Thu, 06 Oct 2016 11:00:03 +0000 X-Virus-Scanned: amavisd-new at hmmailserver2.com Date: Thu, 6 Oct 2016 11:59:58 +0100 (BST) From: Bujji Babu To: Heikki Linnakangas Cc: pgsql-bugs@postgresql.org, pgsql-sql@postgresql.org Message-ID: <1345512202.1556406.1475751598081.JavaMail.zimbra@heales.com> In-Reply-To: References: <535504359.1542314.1475749343449.JavaMail.zimbra@heales.com> Subject: Re: [BUGS] SQL Bug MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailer: Zimbra 8.0.9_GA_6191 (ZimbraWebClient - FF49 (Win)/8.0.9_GA_6191) Thread-Topic: SQL Bug Thread-Index: fyvXwbM9e8SIo93Hg9Lt/uOBDi/q5w== X-Pg-Spam-Score: -4.5 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Dear Heikki, Still same error msg. select * from connectby('emp','empid','mgrid','1','0') AS t(keyid text, parent_keyid text, level int); ERROR: invalid return type DETAIL: SQL key field type text does not match return key field type integer. ********** Error ********** ERROR: invalid return type SQL state: 42804 Detail: SQL key field type text does not match return key field type integer. Thanks&Regards, M.Bujji Babu. ----- Original Message ----- From: "Heikki Linnakangas" To: "Bujji Babu" , pgsql-bugs@postgresql.org, pgsql-sql@postgresql.org Sent: Thursday, 6 October, 2016 11:44:51 AM Subject: Re: [BUGS] SQL Bug On 10/06/2016 01:22 PM, Bujji Babu wrote: > Version string: PostgreSQL 9.5.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit > Please let me know if anyone knows how to fix this. below query works fine in version 9.4. > select * from connectby('emp','empid','mgrid','1',0) > AS t(keyid text, parent_keyid text, level int); > > ERROR: invalid return type DETAIL: SQL key field type text does not match return key field type integer. ********** Error ********** ERROR: invalid return type SQL state: 42804 Detail: SQL key field type text does not match return key field type integer. Try: select * from connectby('emp','empid','mgrid','1','0') AS t(keyid integer, parent_keyid integer, level int); connectby() was made more strict about the datatypes matching in 9.5. See commit 37507962c3d2123b0f21c50d6172fd0b1e059fe7. - Heikki -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql