Thread: can connectby() deal with cyclic graph?

can connectby() deal with cyclic graph?

From
Zhenchang Xing
Date:
hi,

I am a newcomer to PostgreSQL and SQL as well. I am doing my thesis in
university. My topic is about software evolution. So I am often faced with
such questions as:

1) the supertype and/or subtype of class/interface. I read PostgreSQL's
docs and some previous mails about connectby(). I understand it can help
me answer this question. But do i have to give a specific 'start_with'?
how can I query things like "the supertype of all classes"?

2) I understand connectby() can handle hierarchy/tree structure. How
about cyclic graph? For example, i have several classes, A, B, C, D.
A uses B, B uses C, C uses D, and finally D uses A. Starting from class
A, can connectby() return me A uses B, A uses C, A uses D, and stop
when it detect D uses A?

thanks so much.
zhenchang