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