Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EC982B5D80A for ; Sun, 22 May 2011 19:08:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 71463-01 for ; Sun, 22 May 2011 22:08:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from zebedee.cranntara.net (zebedee.cranntara.net [91.186.7.79]) by mail.postgresql.org (Postfix) with ESMTP id D5574B5D801 for ; Sun, 22 May 2011 19:08:20 -0300 (ADT) Received: from [88.210.188.180] (helo=bolek.coachhouse) by zebedee.cranntara.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1QOGos-0001PZ-UQ for pgsql-sql@postgresql.org; Sun, 22 May 2011 23:08:19 +0100 Received: from dick.coachhouse ([192.168.1.32] ident=tarlika) by bolek.coachhouse with esmtp (Exim 4.69) (envelope-from ) id 1QOGhT-0005xr-JG for pgsql-sql@postgresql.org; Sun, 22 May 2011 23:00:39 +0100 Date: Sun, 22 May 2011 23:00:41 +0100 From: Tarlika Elisabeth Schmitz To: pgsql-sql@postgresql.org Subject: Re: extracting location info from string Message-ID: <20110522230041.28d1bc35@dick.coachhouse> In-Reply-To: <20110522210526.0f8b66fa@dick.coachhouse> References: <20110522210526.0f8b66fa@dick.coachhouse> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.20.1; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201105/127 X-Sequence-Number: 35411 On Sun, 22 May 2011 21:05:26 +0100 Tarlika Elisabeth Schmitz wrote: >A column contains location information, which may contain any of the >following: > >1) null >2) country name (e.g. "France") >3) city name, region name (e.g. "Bonn, Nordrhein-Westfalen") >4) city name, Rg. region name (e.g. "Frankfurt, Rg. Hessen") >5) city name, Rg region name (e.g. "Frankfurt, Rg Hessen") I also need to cope with variations of COUNTRY.NAME and REGION.NAME.