From: Adrian Klaver <adrian.klaver@aklaver.com>
To: pf@pfortin.com
To: pgsql-general@lists.postgresql.org
Subject: Re: INSERT UNIQUE row?
Date: Sun, 9 Jul 2023 17:06:24 -0700
Message-ID: <fddb0c02-27cd-4f4b-2c28-45406499dad8@aklaver.com> (raw)
In-Reply-To: <0b2061ad-1a27-d2df-44f6-3af87edf9b6e@aklaver.com>
References: <20230709185807.1bc9afd9.pfortin@pfortin.com>
<0b2061ad-1a27-d2df-44f6-3af87edf9b6e@aklaver.com>
On 7/9/23 17:04, Adrian Klaver wrote:
> On 7/9/23 15:58, pf@pfortin.com wrote:
>> Hi,
>>
>> Trying to figure out how to insert new property addresses into an
>> existing table.
>>
>> Can a UNIQUE constraint be applied to an entire row? Adding UNIQUE to
>> each column won't work in such a case since there are multiple properties
>> * on the same street
>> * in the same town
>> * with the same number on different streets
>> * etc...
>
> Does the locality you are in have something like the Property ID# and/or
> Parcel # / Geo ID shown here:
>
> https://property.whatcomcounty.us/propertyaccess/PropertySearch.aspx?cid=0
Should have added, can you create your own surrogate PK to fill the same
role?
>
>>
>> Each row is only unique as an entity; but the columns are not...
>>
>> Is this covered in the docs?
>>
>> Thanks,
>> Pierre
>>
>>
>>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, pf@pfortin.com
Subject: Re: INSERT UNIQUE row?
In-Reply-To: <fddb0c02-27cd-4f4b-2c28-45406499dad8@aklaver.com>
References: <20230709185807.1bc9afd9.pfortin@pfortin.com> <0b2061ad-1a27-d2df-44f6-3af87edf9b6e@aklaver.com> <fddb0c02-27cd-4f4b-2c28-45406499dad8@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox