From: Rod Taylor <rbt@rbt.ca>
To: Mark Stosberg <mark@summersault.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: A tricky sql-query...
Date: Sun, 02 Nov 2003 20:35:13 -0500
Message-ID: <1067823313.571.95.camel@jester> (raw)
In-Reply-To: <slrnbqb94a.2417.mark@tanagra.summersault.com>
References: <bn6uhi$jp3$1@news.hub.org>
<slrnbqb94a.2417.mark@tanagra.summersault.com>
On Sun, 2003-11-02 at 19:42, Mark Stosberg wrote:
> On 2003-10-22, Timo <siroco@suomi24.fi> wrote:
> >
> > You can't have any recursion in an pure sql-query, can you?
>
> It depends on how you think of recursion, I'd say. You join on the same
> table a number of times, by giving it a different alias each time. You
> have to manually specify (or generate with application code) all these
> aliases and joins, though. Sometimes people use this technique to
> implement tree structures in SQL.
Not to mention the WITH .. RECURSIVE clause, not yet in PostgreSQL.
Attachments:
signature.asc (application/pgp-signature, 186B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rbt@rbt.ca, mark@summersault.com
Subject: Re: A tricky sql-query...
In-Reply-To: <1067823313.571.95.camel@jester>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox