Re: SQL Bug - Mailing list pgsql-bugs

From Bujji Babu
Subject Re: SQL Bug
Date
Msg-id 801577318.1542367.1475749392421.JavaMail.zimbra@heales.com
Whole thread Raw
In response to SQL Bug  (Bujji Babu <bujji.babu@heales.com>)
List pgsql-bugs

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.


Attachment

pgsql-bugs by date:

Previous
From: Bujji Babu
Date:
Subject: SQL Bug
Next
From: Heikki Linnakangas
Date:
Subject: Re: SQL Bug