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


---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to