agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Bujji Babu <bujji.babu@heales.com>
To: pgsql-bugs@postgresql.org
To: pgsql-sql@postgresql.org
Subject: Re: SQL Bug
Date: Thu, 6 Oct 2016 11:23:12 +0100 (BST)
Message-ID: <801577318.1542367.1475749392421.JavaMail.zimbra@heales.com> (raw)
In-Reply-To: <535504359.1542314.1475749343449.JavaMail.zimbra@heales.com>
References: <535504359.1542314.1475749343449.JavaMail.zimbra@heales.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
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.
schema Backup file attached.
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.
CREATE TABLE public.emp
(
empid integer NOT NULL,
name text,
mgrid integer,
CONSTRAINT emp_pkey PRIMARY KEY (empid)
)
insert into emp(empid,mgrid,name)
values(1,0,'emp1');
insert into emp(empid,mgrid,name)
values(2,1,'emp1');
insert into emp(empid,mgrid,name)
values(3,1,'emp1');
insert into emp(empid,mgrid,name)
values(4,2,'emp1');
insert into emp(empid,mgrid,name)
values(5,2,'emp1');
Thanks&Regards,
M.Bujji Babu.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
Attachments:
[application/x-trash] test.pgsql.bak (2.7K, ../801577318.1542367.1475749392421.JavaMail.zimbra@heales.com/3-test.pgsql.bak)
download
view thread (9+ messages) latest in thread
Message-ID: <801577318.1542367.1475749392421.JavaMail.zimbra@heales.com>
Permalink: ../801577318.1542367.1475749392421.JavaMail.zimbra@heales.com/
Also on: postgresql.org/message-id/801577318.1542367.1475749392421.JavaMail.zimbra@heales.com
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bujji.babu@heales.com, pgsql-bugs@postgresql.org
Subject: Re: SQL Bug
In-Reply-To: <801577318.1542367.1475749392421.JavaMail.zimbra@heales.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox