Received: from pop1.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.org (8.10.1/8.10.1) with ESMTP id e8EEjws70280 for ; Thu, 14 Sep 2000 10:45:58 -0400 (EDT) Received: from dds.nl (p125.hen.euronet.nl [194.134.25.61]) by pop1.euronet.nl (Postfix) with ESMTP id ECA0C4F725 for ; Thu, 14 Sep 2000 16:45:53 +0200 (MET DST) Message-ID: <39C0E49C.3060802@dds.nl> Date: Thu, 14 Sep 2000 16:45:48 +0200 From: Rob Hoopman User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20000913 X-Accept-Language: en MIME-Version: 1.0 To: pgsql-general@postgresql.org Subject: Recursive queries Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200009/330 Hi all, I have a question that probably is more apropriate for pgsql-dummies but since I use postgres and don't know what list would be more apropriate... here goes: I have some data that I want to be able to search by geographic location. The geographic locations are stored in a table with a reference to their parent location (i.e. Germany has a reference to Europe whis is in the same table) I am wondering what the best aproach is when I want to perform a search by location and need to include all child locations. For example I want to return all results applying to the European Union which means it should include all childcountries, provinces, cities, etc in the search. Any suggestions, or pointers to sources of info? Thanks, Rob Hoopman