X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D0A023A5856 for ; Tue, 25 Jan 2005 19:50:17 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11645-02 for ; Tue, 25 Jan 2005 19:50:11 +0000 (GMT) Received: from svana.org (svana.org [203.20.62.76]) by svr1.postgresql.org (Postfix) with ESMTP id 0A66D3A45E6 for ; Tue, 25 Jan 2005 19:50:09 +0000 (GMT) Received: from kleptog by svana.org with local (Exim 3.35 #1 (Debian)) id 1CtWhP-0003IK-00; Wed, 26 Jan 2005 06:50:03 +1100 Date: Tue, 25 Jan 2005 20:50:02 +0100 From: Martijn van Oosterhout To: tmp Cc: pgsql-general@postgresql.org Subject: Re: Recursive queries Message-ID: <20050125194959.GL29308@svana.org> Reply-To: Martijn van Oosterhout Mail-Followup-To: tmp , pgsql-general@postgresql.org References: <20050125185833.GK29308@svana.org> <1106681095.3214.6.camel@debian> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QnBU6tTI9sljzm9u" Content-Disposition: inline In-Reply-To: <1106681095.3214.6.camel@debian> User-Agent: Mutt/1.3.28i X-PGP-Key-ID: Length=1024; ID=0x0DC67BE6 X-PGP-Key-Fingerprint: 295F A899 A81A 156D B522 48A7 6394 F08A 0DC6 7BE6 X-PGP-Key-URL: X-Warning: Normally my messages are signed, but not on the ozTiVo list due to legacy application support X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.017 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/1412 X-Sequence-Number: 72361 --QnBU6tTI9sljzm9u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 25, 2005 at 08:24:54PM +0100, tmp wrote: > > What do you mean by resursive queries? A query can have a subquery > > which calls a function which executes another query. That counts as > > recursion in my book. What type of recursion are you thinking of? >=20 > SQL:2003 defines a language construct for recursive queries (T131 and > T132). What I ment with the question was: Will postgresql soon support a > similar (or the same) construct? I don't have the SQL standard but I think you're referring to tables that join to themselves and you want to follow these links recursively. I don't think anybody has written the syntactic sugar, but someone did write a function that provides equivalent output. Have a nice day, --=20 Martijn van Oosterhout http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them. --QnBU6tTI9sljzm9u Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQFB9qLnY5Twig3Ge+YRAmutAJsHQdnlQm7w3Wb/+riP3T7N/YRk6ACfcbuN 4g1fh6+Hc65mbvn5b0FyA84= =7St9 -----END PGP SIGNATURE----- --QnBU6tTI9sljzm9u--