Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1heGJ3-0008HE-Qj for pgsql-general@arkaria.postgresql.org; Fri, 21 Jun 2019 09:58:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1heGJ0-0001VG-Mx for pgsql-general@arkaria.postgresql.org; Fri, 21 Jun 2019 09:58:02 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1heGJ0-0001V8-8k for pgsql-general@lists.postgresql.org; Fri, 21 Jun 2019 09:58:02 +0000 Received: from mout.gmx.net ([212.227.15.15]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1heGIx-0004E0-6b for pgsql-general@lists.postgresql.org; Fri, 21 Jun 2019 09:58:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1561111076; bh=sKioAT89eHJ4+UyrlsZew447nFuPubuI3AyAaKiZygw=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=Jq9wvapaUsNey88r1BqSOe+cXbI734X+YHwZPMn6XdSyi9LcsQP+tTS2CIqQTuk5T TiGuindOr/++r1AgSna5Q7+G3pfBoGQPEtvZarJ2PTppdrc5/aOglVNd83OitMcJKd r8wzYzM6tsyGBFEE2OGtyJ5T/UId9S6avgmFlsE0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from hermes ([78.54.114.223]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LwIuc-1ifPsD2UN4-0186qp for ; Fri, 21 Jun 2019 11:57:55 +0200 Received: from ncq by hermes with local (Exim 4.92) (envelope-from ) id 1heGIs-0000j9-KH for pgsql-general@lists.postgresql.org; Fri, 21 Jun 2019 11:57:54 +0200 Date: Fri, 21 Jun 2019 11:57:54 +0200 From: Karsten Hilbert To: pgsql-general@lists.postgresql.org Subject: Re: Row data is reflected in DETAIL message when constraints fail on insert/update Message-ID: <20190621095754.GA2222@hermes.hilbert.loc> References: <20190620114527.GD30366@hermes.hilbert.loc> <20190620152741.GG30366@hermes.hilbert.loc> <13631.1561047413@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13631.1561047413@sss.pgh.pa.us> Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) User-Agent: Mutt/1.10.1 (2018-07-13) Sender: X-Provags-ID: V03:K1:/NMMzNtUsoQl1sygm3ddqr5/d8quGJB9skkqwy45py7RMzxKW5C kojh8RMRGLw6HhsnG1ZHCGxz5yl+FDRpopgJ+bWPITwivTb2BG0P0k6rDdp2NfKObrTWmyy UGU69Zdj2Y6K9HKhQ6tvLFkgCPNmWXPQ/t5IQdUL36TvzRA5KJA80OKJbAR9dV1tDa8Y7gf gScn54fSK+zwPhzEqiRHw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ApffyPYHf40=:sKp+sJvb5mU8+/M9dDOXw6 /OImDrMsjN8eKskrI4JYJHZDdmz/8ri9XQ2nQ9AG3sR/D28lRoQW/oit0fKbHaxALzPFPufct 1wCWTArOi0F2BHE96uF9O5j9drmsfFyqWDgNWEMxgU2n/+Zs7sKDReeQyofJkGR9vNsDTPpwp MREHvCUJq4wVtz5o2kpNel4MB8L/clf/MNIbrPyHAU2Ge51LZzo/fZmrAxNT6Vkkv5p0Fqseo OqjPfJ/kFWdhRgjcWoJlUMAYj6i2DkgeF6ZBTUz+uhXKb/LLEaTLd9UpkcPD6eZ8CViDBKOdw tfkeoXwQy7H/lpjkhI9QePT0BqOMiOU3rPRHSuFaeqWf4e0QSOeyliD4vHJis7L1zms/0Z484 O+iLxO8v9VrT94hed/PAbLn5Z8OLavnhE19gDABZjTt5OOBOXkhrN9i9aAQHbdeNSS+//48Et x6te8LXfJnmknEK7nDd2UQWGxTmj6diX3HOt/sPcoQ8JbZGc/dCsl1w6x+GAmK2A4jyHbwRKU irdc/g+D5w4qpraOHr92okwobPfjp0sbnSg1SNARLjYC50SWjfiagdhrgbRyEFUOBJwmcB5Ke XOWiHbuGSrQoDlRBHvWgwDMpBu0PcqeS0Jzlt6+PjWdqoiPKkX6rc1zerJBloTdSjJjnF10tP a9HclFpD0wJmmV6z2ihGZJf0N0vyePcNPFIz1o+1FnXvaG9v2G0D9mBSiHRJxU2TXAG3k8DDI KU3GmVJlByr1oSCmMr4ljGJecDEQF3rKimSOfm/hKQzKPlPKFZJT/DEd0gMUWJKnId9tA+Ugn bkzgutpianQGMzNgE9A6Xqx8grwExFLrJ6M2GoBty2agOr85fwMTMNGArUMGdlhKBCpMhhQwf pTOmWf6tdtZtDPrBLN8zytK3IoIq8HS0DUiPjpaTSppUYizUtmrqh09XgYq50oJ9t037Xj3iA WShiTwGQS7eRnGDrrpfY4vDkZKqGvbL4= Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Jun 20, 2019 at 12:16:53PM -0400, Tom Lane wrote: > Admittedly, in your example there's a difference between what "the app" > should know and what "the user using the app" should know. But I'm not > really seeing how Postgres could usefully model that situation. We have > no idea about the structure of the client-side logic. Absolutely. Perhaps another solution to that problem would be for OP to tell PG about the desired client-side logic by wrapping all data access into views and/or functions (cf data masking). I guess the original question basically boils down to "Given a rogue/dumb app, and a DBA who neglected his job, is it PG's business (or even within its possibilities) to mop up ?" I'd be inclined to say No. I would agree it is not entirely trivial to accept that resolve, though. Karsten =2D- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B