pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Stosberg <mark@summersault.com>
To: pgsql-sql@postgresql.org
Subject: Re: A tricky sql-query...
Date: Mon, 3 Nov 2003 00:42:46 +0000 (UTC)
Message-ID: <slrnbqb94a.2417.mark@tanagra.summersault.com> (raw)
References: <bn6uhi$jp3$1@news.hub.org>

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.  

	Mark

-- 
http://mark.stosberg.com/ 




view thread (4+ messages)  latest in thread

Message-ID: <slrnbqb94a.2417.mark@tanagra.summersault.com>
Permalink:  ../slrnbqb94a.2417.mark@tanagra.summersault.com/
Also on:    postgresql.org/message-id/slrnbqb94a.2417.mark@tanagra.summersault.com

 · 

reply

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: mark@summersault.com
  Subject: Re: A tricky sql-query...
  In-Reply-To: <slrnbqb94a.2417.mark@tanagra.summersault.com>

* 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