Skip site navigation (1) Skip section navigation (2)

Hierarchical query's

From: Cláudia Morgado <claudia(dot)morgado(at)widesoft(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Cc: <cmmello(at)wide(dot)com(dot)br>
Subject: Hierarchical query's
Date: 2003-10-23 15:58:48
Message-ID: 012001c3997e$8be9f300$15011aac@widesoft.com.br (view raw or flat)
Thread:
Lists: pgsql-general
Hello!

Oracle has the option with the SQL CONECT BY statement to run through a hierarchical database with a single SQl-statement:

<!--SQL SELECT ms_id,ms_parent FROM messages CONNECT BY PRIOR ms_id = ms_parent START WITH ms_id = 1 --> 

Result-set (example): 

ms_id parent_id 1 1.1 1 1.1.1 1.1 1.1.2 1.1 1.1.3 1.1 1.2 1 1.2.1 1.2 

etc 


I need to do this in PostgreSql. 

This is possible in the Postgre?


regards,
Cláudia Morgado and Carla Mello


Responses

pgsql-general by date

Next:From: RonDate: 2003-10-23 16:02:03
Subject: Nullable 'Foreign Key-like' Constraint
Previous:From: scott.marloweDate: 2003-10-23 15:40:08
Subject: Re: database files

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group