Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erUVp-00068j-Ms for pgsql-general@arkaria.postgresql.org; Thu, 01 Mar 2018 20:09:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1erUVo-0004cC-Hq for pgsql-general@arkaria.postgresql.org; Thu, 01 Mar 2018 20:09:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erUVo-0004c0-7W for pgsql-general@lists.postgresql.org; Thu, 01 Mar 2018 20:09:08 +0000 Received: from mail-qt0-x22a.google.com ([2607:f8b0:400d:c0d::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1erUVk-00023c-8u for pgsql-general@lists.postgresql.org; Thu, 01 Mar 2018 20:09:07 +0000 Received: by mail-qt0-x22a.google.com with SMTP id g60so9174149qtd.11 for ; Thu, 01 Mar 2018 12:09:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=y/AB5hgWAMbqnx507CNaRy1LOJj2+k+I04mSZkvMT8U=; b=A/g2AnCHB/hSzS6r/rhIvzTUIwrBQtWgj6NBhFIuJCEkBmidl7Hh0x+hcBIQyllk9X Sh3XzXp+o3SbmqMBw6CArvb2TJW37qNiNpWEVfEWRlUZUEByFvLS2CprCyKjrDk6iyZk xIu0Eb7SrUNgTqiwa3A2S2o8VUnWNbEQabl4Xl9XhWEROYtz7bCj/Q0JvWrHFz5nc1T5 RRlmY3VpBZEBOunjYDs3dE0rpxwWe/txL2WHCtN3DvrXUirSIs2Lw+kMA3ba+5AFbqto PMvl7TsPVb9sbELe7G2Sb9irW/meVjGpen9TlqSrZGt6YGCkDznwqulNjWFYT+h8ip/Y 6HJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=y/AB5hgWAMbqnx507CNaRy1LOJj2+k+I04mSZkvMT8U=; b=pc82JkZMuz8IbbasD+HX7ajpbwMDIcNWxNeoS6tI584BvQ8ThMWhXSoAun/fm5Rt8/ w+KUUqof13t5zIhZZ2hOCaORAz9YaQfLTZJh9y7rFEug+YtUgU3xvUHEgHI+RZsxp8+h VNs/8dRexP6d+nQCucPM9roNBCJScmyj5JwbaKSAAgjR2XxjLtGut7Rd8fPanjUHRiyf F/r6gqNfjKxbOhuPyRWbTmdskFvL5630O8XswpMjEZjDQzcdCZXWWl13LuZmcqrxEYIi k9/3ovXtd4N6hyRz1qnHGzjaklPEHyjzXuvbPiEkDm4yB6xY16y/GsnjJv8UJtB64baG oXtw== X-Gm-Message-State: AElRT7EDcrvtDcnL8mYkZIwptb3ue7BWBAtrEvu8NXhDW3EQblJL5lIY p8sQQ6zMMmzfEsO0A9uQxpCsvJpD X-Google-Smtp-Source: AG47ELu/I0yP022BhRfougqj3PsU+6+7NS8uahcbSu8Ez/+eoeuRD2irW2mzkVh2gbbibvv0FaB6yA== X-Received: by 10.200.51.124 with SMTP id u57mr4988857qta.127.1519934940837; Thu, 01 Mar 2018 12:09:00 -0800 (PST) Received: from [192.168.1.250] (host63.190-229-77.telecom.net.ar. [190.229.77.63]) by smtp.gmail.com with ESMTPSA id s4sm3496561qta.34.2018.03.01.12.08.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Mar 2018 12:09:00 -0800 (PST) Subject: Re: Enforce primary key on every table during dev? To: pgsql-general@lists.postgresql.org References: <161e1761560-58a6-18e4b@webjas-vad211.srv.aolmail.net> <5a1870db-7018-fe15-ac60-ffe37abb7077@cox.net> <5da96fe6-666b-1107-ee76-b464417bd1b7@cox.net> <121bb8e7-7e33-81ff-f0d2-cad4d799595d@cox.net> From: marcelo Message-ID: Date: Thu, 1 Mar 2018 17:08:57 -0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <121bb8e7-7e33-81ff-f0d2-cad4d799595d@cox.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Antivirus: Avast (VPS 180228-6, 28/02/2018), Outbound message X-Antivirus-Status: Clean List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 01/03/2018 16:42 , Ron Johnson wrote: > 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. > Do you know about unit testing? --- El software de antivirus Avast ha analizado este correo electr=C3=B3nico en= busca de virus. https://www.avast.com/antivirus