From: | Michael Davis <michael(dot)davis(at)prevuenet(dot)com> |
---|---|
To: | pgsql-general(at)postgreSQL(dot)org |
Subject: | RE: [GENERAL] Tree structure |
Date: | 1999-02-26 08:21:44 |
Message-ID: | 93C04F1F5173D211A27900105AA8FCFC145207@lambic.prevuenet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
You could try select spaces(pointer::int4) || Number; Where spaces() is a
function that inserts "pointer" number of spaces (or dashes if you want to
create your own function). Not sure if spaces() exists in Postgres or not,
but it seems I read about it or a similar function somewhere.
-----Original Message-----
From: Kaare Rasmussen [SMTP:kar(at)webline(dot)dk]
Sent: Friday, February 26, 1999 1:06 AM
To: pgsql-general(at)postgreSQL(dot)org
Subject: [GENERAL] Tree structure
I can't figure this one out. I need a tree structure like this
Number Pointer
1 0
2 1
3 1
4 2
5 0
6 1
7 5
This should somehow show up like this
Number
1
2
4
3
6
5
7
The whole excercise is because I'd like to show a tree structure:
1
- 2
- - 4
- 3
- 6
5
- 7
Is this possible with PostgreSQL?
From | Date | Subject | |
---|---|---|---|
Next Message | Peter T Mount | 1999-02-26 11:00:30 | Re: [GENERAL] Tree structure |
Previous Message | Kaare Rasmussen | 1999-02-26 08:06:01 | Tree structure |