Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f2J3B5655075 for ; Sun, 18 Mar 2001 22:11:05 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2J09c659813 for ; Sun, 18 Mar 2001 19:09:38 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f2INuXs19714 for pgsql-sql@postgresql.org; Sun, 18 Mar 2001 18:56:33 -0500 (EST) (envelope-from news) From: "Grant Furick" X-Newsgroups: comp.databases.postgresql.sql Subject: hierarchical order equivalent Date: Sun, 18 Mar 2001 18:56:17 -0500 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 16 Message-ID: <993hvg$j7v$1@news.tht.net> X-Complaints-To: scrappy@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: pgsql-sql@postgresql.org X-Archive-Number: 200103/347 X-Sequence-Number: 2011 Is there an equivalent way to do this Oracle query in Postgres? Select category_id, parent_category_id, category_name FROM Category START WITH category_id = 6 CONNECT BY PRIOR category_id = parent_category_id Order by category_name I am trying to build a hierarchy of inter-related categories. I want an easy way to output the tree. Any ideas? Thanks, Grant