How do I do this? - Mailing list pgsql-sql

From Wei Weng
Subject How do I do this?
Date
Msg-id 4241A972.6040103@kencast.com
Whole thread Raw
Responses Re: [despammed] How do I do this?  (Andreas Kretschmer <akretschmer@despammed.com>)
Re: How do I do this?  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-sql
I have a table with column filepath with contents that look like the following:

filepath
==============
/var/log/foo
/var/log/bar
/var/cache/foo
/var/cache/bar
/var/foo
/var/bar

Is there anyway to retrieve the directory information only regarding those 
filepaths?

So that I can get

/var/log
/var/cache
/var

as the result of a query?

Thanks!

(I am using PostgreSQL 7.4)



Wei



pgsql-sql by date:

Previous
From: Sean Davis
Date:
Subject: Re: Self-referencing table question
Next
From: Gary Stainburn
Date:
Subject: Re: best way to swap two records (computer details)