Re: SQL Bug

From: Bujji Babu <bujji(dot)babu(at)heales(dot)com>
To: pgsql-bugs(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL Bug
Date: 2016-10-06 10:23:12
Message-ID: 801577318.1542367.1475749392421.JavaMail.zimbra@heales.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-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.

Attachment Content-Type Size
test.pgsql.bak application/x-trash 2.7 KB

In response to

  • SQL Bug at 2016-10-06 10:22:23 from Bujji Babu

Browse pgsql-bugs by date

  From Date Subject
Next Message Oleksandr Shulgin 2016-10-06 10:44:46 Re: SQL Bug
Previous Message Bujji Babu 2016-10-06 10:22:23 SQL Bug

Browse pgsql-sql by date

  From Date Subject
Next Message Oleksandr Shulgin 2016-10-06 10:44:46 Re: SQL Bug
Previous Message Bujji Babu 2016-10-06 10:22:23 SQL Bug