Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYdJ5-0000HL-3A for pgsql-general@arkaria.postgresql.org; Tue, 12 May 2020 22:23:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYdJ2-0006dg-Sh for pgsql-general@arkaria.postgresql.org; Tue, 12 May 2020 22:23:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYdJ2-0006dZ-Kg for pgsql-general@lists.postgresql.org; Tue, 12 May 2020 22:23:20 +0000 Received: from [50.126.108.78] (helo=mail.appl-ecosys.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYdJ0-0004Ly-0C for pgsql-general@lists.postgresql.org; Tue, 12 May 2020 22:23:19 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 4351C262BD4 for ; Tue, 12 May 2020 15:23:13 -0700 (PDT) Date: Tue, 12 May 2020 15:23:13 -0700 (PDT) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Enforcing uniqueness on [real estate/postal] addresses In-Reply-To: Message-ID: References: <87o8qu0ygd.fsf@gmail.com> <20200512170741.GA11324@hjp.at> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Host-Lookup-Failed: Reverse DNS lookup failed for 50.126.108.78 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, 12 May 2020, Peter Devoy wrote: >> Is is possible to have two entries which have the same >> address_identifier_general, street and postcode, but different >> descriptions? > > Unfortunately, yes. The data comes from gov't systems to regulate the > development/alteration of arbitrary pieces of property and those pieces do > not always have a postal address. E.g. a farmer may one year apply to > erect a wind turbine in "field north of Foo Cottage" and the next year > apply to demolish "barnhouse west of Foo Cottage". I'm in the US but recently read (in The Economist, I think) that house numbers in the UK are sometimes denied by the local government and the owner told to select a name for the property. Can you have a primary key for the property descrption, e.g., "Foo Cottage" and another (related) column for objects associated with it; e.g., "North field" and "West barnhouse?" Similar to an apartment (flat) number in a multifamily dwelling. Rich