X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 157BE53582 for ; Wed, 23 Mar 2005 17:32:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 58473-09 for ; Wed, 23 Mar 2005 17:31:55 +0000 (GMT) Received: from ylpvm12.prodigy.net (ylpvm12-ext.prodigy.net [207.115.57.43]) by svr1.postgresql.org (Postfix) with ESMTP id 3031E53558 for ; Wed, 23 Mar 2005 17:31:54 +0000 (GMT) Received: from pimout6-ext.prodigy.net (pimout6-ext.prodigy.net [207.115.63.78]) by ylpvm12.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id j2NHVoxd025373 for ; Wed, 23 Mar 2005 12:31:50 -0500 X-ORBL: [69.177.163.214] Received: from [192.168.1.207] (214.adsl.snet.net [69.177.163.214] (may be forged)) by pimout6-ext.prodigy.net (8.12.10 milter /8.12.10) with ESMTP id j2NHVrHY366808 for ; Wed, 23 Mar 2005 12:31:53 -0500 Message-ID: <4241A972.6040103@kencast.com> Date: Wed, 23 Mar 2005 12:37:54 -0500 From: Wei Weng User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: How do I do this? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/314 X-Sequence-Number: 20793 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