Hello, i have a table like this:
CREATE TABLE "public"."WINUSER" ( "ID_WINUSER" INTEGER NOT NULL, "STATUS" INTEGER NOT NULL, "CUSTOMERID" VARCHAR(8) NOT NULL, "CUSTOMERPW" VARCHAR(100) NOT NULL, "EMAIL" VARCHAR(100) NOT NULL, "REF_ID_WINUSER" INTEGER, PRIMARY KEY("ID_WINUSER"), ) WITH OIDS; and will get the tree from this to fields: "ID_WINUSER" INTEGER NOT NULL, "REF_ID_WINUSER" INTEGER, i write this sql: 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 How is the correct use of connectby() for me? ------------------------------------------ Thomas Wegner "Joe Conway" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Merrall, Graeme wrote: > > Am I right in thinking that recursive procedures and procs returning row > > sets would allow us to better emulate this behaviour? As anyone looked > > at it yet? > > > > See connectby() in contrib/tablefunc. Someone was working on SQL99 > recursive queries but it didn't get done for 7.4 -- perhaps it will be > in 7.5. In the meantime, connectby() is in 7.3 and might work for you. > > HTH, > > Joe > > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend > ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]