From: Ron Johnson <ron.l.johnson@cox.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Enforce primary key on every table during dev?
Date: Thu, 1 Mar 2018 13:42:18 -0600
Message-ID: <121bb8e7-7e33-81ff-f0d2-cad4d799595d@cox.net> (raw)
In-Reply-To: <GjBK1x03w1DF5NZ01jBMsX>
References: <C9EFC294-83B5-41FD-9542-60FDBB2588C6@gmail.com>
<161e1761560-58a6-18e4b@webjas-vad211.srv.aolmail.net>
<5a1870db-7018-fe15-ac60-ffe37abb7077@cox.net>
<GiZ41x00v1DF5NZ01iZ5Ez>
<5da96fe6-666b-1107-ee76-b464417bd1b7@cox.net>
<GjBK1x03w1DF5NZ01jBMsX>
On 03/01/2018 01:11 PM, marcelo wrote:
>
> On 01/03/2018 16:00 , Ron Johnson wrote:
[snip]
>> If your only unique index is a synthetic key, then you can insert the
>> same "business data" multiple times with different synthetic keys.
>>
>>
>> --
>> Angular momentum makes the world go 'round.
> IMHO, business logic can and must preclude "garbage insertion". Except you
> are inserting data directly to database using SQL, any n-tier architecture
> will be checking data validity.
Any n-tier architecture that's bug-free.
--
Angular momentum makes the world go 'round.
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: ron.l.johnson@cox.net
Subject: Re: Enforce primary key on every table during dev?
In-Reply-To: <121bb8e7-7e33-81ff-f0d2-cad4d799595d@cox.net>
References: <C9EFC294-83B5-41FD-9542-60FDBB2588C6@gmail.com> <161e1761560-58a6-18e4b@webjas-vad211.srv.aolmail.net> <5a1870db-7018-fe15-ac60-ffe37abb7077@cox.net> <GiZ41x00v1DF5NZ01iZ5Ez> <5da96fe6-666b-1107-ee76-b464417bd1b7@cox.net> <GjBK1x03w1DF5NZ01jBMsX> <121bb8e7-7e33-81ff-f0d2-cad4d799595d@cox.net>
* 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