Re: Oracle 'connect by prior' now eaiser in 7.3? - Mailing list pgsql-sql

From Joe Conway
Subject Re: Oracle 'connect by prior' now eaiser in 7.3?
Date
Msg-id 3F8C3657.7040907@joeconway.com
Whole thread Raw
In response to Re: Oracle 'connect by prior' now eaiser in 7.3?  ("Thomas Wegner" <tomaten@t-online.de>)
List pgsql-sql
Thomas Wegner wrote:
>>SELECT "ID_WINUSER" FROM connectby('"WINUSER"', '"ID_WINUSER"',
>>'"REF_ID_WINUSER"', 4, 0, '~') AS t("ID_WINUSER" integer)
>>
>>and get this error:
>>
>>ERROR:  Query-specified return tuple not valid for Connectby: wrong number
>>of columns

Please see the documentation (README.tablefunc). You need to properly 
specify the column definitions in the FROM clause, i.e. (untested):

SELECT "ID_WINUSER" FROM  connectby('"WINUSER"', '"ID_WINUSER"','"REF_ID_WINUSER"', 4, 0, '~')  AS t("ID_WINUSER"
integer,      "REF_ID_WINUSER" integer,       level integer,        branch text);
 

HTH,

Joe




pgsql-sql by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: [PERFORM] sql performance and cache
Next
From: Peter Eisentraut
Date:
Subject: Re: security definer function