Re: Postgres and recursion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: glenn <vmstech(at)tpg(dot)com(dot)au>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Postgres and recursion
Date: 2003-02-27 06:46:04
Message-ID: 8971.1046328364@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

glenn <vmstech(at)tpg(dot)com(dot)au> writes:
> I've got this simple function which climbs up a 'selfjoin' tree called
> job, and reports back the id of the root of the tree. It seemed to work
> in 7.2 (which I'm told doesn't recurse???), but I've just upgraded to
> 7.3.2 (i.e debians latest) and when I execute it, the server kicks me
> off, like so:

That sounds like a bug, but you have not provided enough detail to let
anyone try to reproduce it --- the function uses a table that you
haven't described, and any specific call would depend on the contents
of the table, which you haven't given.

The function does appear to be capable of going into infinite recursion
if the table contents are wrong (eg two nodes pointing at each other),
but AFAICS that would lead to stack-overflow coredump in any PG version.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Jennifer Lee 2003-02-27 12:38:52 adding data to tables with sequences
Previous Message glenn 2003-02-27 03:16:39 Postgres and recursion