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 1jYdah-0000zV-4w for pgsql-general@arkaria.postgresql.org; Tue, 12 May 2020 22:41:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYdad-0003Bv-Ux for pgsql-general@arkaria.postgresql.org; Tue, 12 May 2020 22:41:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYdac-0003BW-7M for pgsql-general@lists.postgresql.org; Tue, 12 May 2020 22:41:31 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYdaX-0002cZ-19 for pgsql-general@lists.postgresql.org; Tue, 12 May 2020 22:41:28 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 387C5612; Tue, 12 May 2020 18:41:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 12 May 2020 18:41:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=N xnI7fG44yC6bKkNfmeC6NKSPBwkmNCh36BlHse+tOo=; b=ZkX7nU4tnt4OO/A9W F4Uwq1ggd4lIKOGhbOrL2PyEg/yI0kIJhDNIenc95jSV5EJeW1x39mUbF7zXCMjt x7NhOKam2QBrUKpGdrQ4eBcqvRRAEBXcRMkyz3i+N/WtwqUkB+klJCPAnF5v+Ffy rPWIHFcn1UXJ/e/8XVZQuWlPjO7YCA4hDv9POtOLwagUPogQwRfWlMarvi/zqoQO mwwKeZaqk63xhSd3BBjsrMPi05+ciY4TnLYc8AeCgoKOdLz12eIAMW8rbushzhqs /tyvDYeICUUNMRZ/6dBdkL9VzvZQ+K+nWFHq81j3O/Yj695IQeGrqqTTt1e+sOML XLn8w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=NxnI7fG44yC6bKkNfmeC6NKSPBwkmNCh36BlHse+t Oo=; b=DX3bc3yxUtRAtmATDsFMGg4b7JKabHmfLVAlEwtd4t1z4OSs9YdBK5lkN 9uZvUMETne4cyr5GPYfE3XMryT/w8VvquWKh02x2/isd5EpSrOLqkBTSLkyIZ0uU WYdBtEpvi0BkP1DMuRxlvxRq2LhrZrCGd+xW84rUJaTN+mXxNN1Eq/Rd8OVIDAnp LHu0Y9emnGlxq5wt/LpgnH4NhyCauhicUC936amE4BYQRG8dUz1oNbr9x8Ob3MjF IXwym09Qp8CqFyaOLb0m3FTUbbtkF5CV1Ajxi7ykjGZBw9b5+CWKV5XyLyHYi9KZ fF+H6lavcvM/mB6z+YO3nZmSQBV0w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrleefgddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepteejvdetffejuedvleeifeefheeutdfhgfdvhffhhfek vdduveegvdejudefgfevnecukfhppeejhedrudejvddrhedrvdefudenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghv vghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id DF8313066268; Tue, 12 May 2020 18:41:19 -0400 (EDT) Subject: Re: Enforcing uniqueness on [real estate/postal] addresses To: Peter Devoy , "Peter J. Holzer" Cc: pgsql-general@lists.postgresql.org References: <87o8qu0ygd.fsf@gmail.com> <20200512170741.GA11324@hjp.at> From: Adrian Klaver Message-ID: <0db59800-fd9b-5bd8-ff06-0f10c2c642af@aklaver.com> Date: Tue, 12 May 2020 15:41:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/12/20 1:55 PM, 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". Having farmed myself, letting a farmer define a property is a questionable practice:) > > Now, I know what you are thinking, there is a normalization opportunity and you > may well be right. However, the problem does exist in some of the other fields > too and I am already facing a fair amount of join complexity in my schema so I > am trying to figure out my options :) > >> (What is an address_identifier_general, btw?) > Address identifier composed by numbers and/or characters. I'm using the > terminology from the EU's "INSPIRE Data Specification on Addresses" Guidelines. Took a quick scan through above, that was mind numbing. I did see that there are provisions for geographic reference grids. Is that an option? > > I haven't yet had the opportunity to try out the above suggestions but I will > post again when I have. > > -- Adrian Klaver adrian.klaver@aklaver.com