Re: Limits of SQL

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Joachim Zobel <jzobel(at)heute-morgen(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Limits of SQL
Date: 2005-06-04 20:22:13
Message-ID: 20050604202213.GA20567@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Jun 04, 2005 at 21:53:24 +0200,
Joachim Zobel <jzobel(at)heute-morgen(dot)de> wrote:
> Am Samstag, den 04.06.2005, 07:38 -0500 schrieb Bruno Wolff III:
> > On Sat, Jun 04, 2005 at 11:31:02 +0200,
> > Joachim Zobel <jzobel(at)heute-morgen(dot)de> wrote:
> > >
> > > ... And it seems that
> > > a plain SELECT that tells me if a path exists is not possible...
> >
> > When 'WITH' gets implemented then you should be able to do this. I think
> > there was some recent talk about that, but I don't know if it is going to
> > make it in to 8.1. We'll know in about a month though.
>
> So WITH will allow recursion so I can walk the graph, right? Does this
> mean I can recursively join until a terminating condition is reached?

It can be used to compute transitive closures, which I think is what
you are really looking for.
If you look at the TODO page (http://www.postgresql.org/docs/faqs.TODO.html)
you will see two entries for WITH under Exotic Features:
Add SQL99 WITH clause to SELECT
Add SQL99 WITH RECURSIVE to SELECT

There is a short example of this on pages 439-440 of "SQL for Smarties"
second edition.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Hayward 2005-06-04 21:00:06 Re: prevent user change password?
Previous Message Joachim Zobel 2005-06-04 19:53:24 Re: Limits of SQL