Re: additional patch for contrib/tablefunc - added to regression - Mailing list pgsql-patches

From Joe Conway
Subject Re: additional patch for contrib/tablefunc - added to regression
Date
Msg-id 3D93B1B8.5050805@joeconway.com
Whole thread Raw
In response to Re: additional patch for contrib/tablefunc - added to  (Gavin Sherry <swm@linuxworld.com.au>)
Responses Re: additional patch for contrib/tablefunc - added to  (Gavin Sherry <swm@linuxworld.com.au>)
List pgsql-patches
Gavin Sherry wrote:
> Joe,
>
> This test presumes that it will succeed. That is, if there is an infinite
> recursion here, the test will just hang -- as far as I can tell -- and
> will not *actually* report the failure.

No, look at expected/tablefunc.out:

-- recursion detection
INSERT INTO connectby_int VALUES(10,9);
INSERT INTO connectby_int VALUES(11,10);
INSERT INTO connectby_int VALUES(9,11);
-- should fail due to infinite recursion
SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0, '~')
AS t(keyid int, parent_keyid int, level int, branch text);
ERROR:  infinite recursion detected
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Unless I'm miss-understanding you?

Joe




pgsql-patches by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: additional patch for contrib/tablefunc - added to
Next
From: Gavin Sherry
Date:
Subject: Re: additional patch for contrib/tablefunc - added to