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 1itHsd-0000n6-MA for pgsql-committers@arkaria.postgresql.org; Sun, 19 Jan 2020 21:13:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1itHsb-0001XK-QK for pgsql-committers@arkaria.postgresql.org; Sun, 19 Jan 2020 21:13:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1itHsb-0001XC-7q for pgsql-committers@lists.postgresql.org; Sun, 19 Jan 2020 21:13:09 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1itHsX-0001EZ-TY for pgsql-committers@lists.postgresql.org; Sun, 19 Jan 2020 21:13:07 +0000 Received: by mail-pj1-x1043.google.com with SMTP id m13so6083702pjb.2 for ; Sun, 19 Jan 2020 13:13:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cZq52Q6rLycH0BAcmoLdhhdQaOL722pQyzzyEkEtNeM=; b=LUj/sKflylpLFYnX5aHN/vEfzbWq6+x4E9AqTRoSkCjb0gjLUPAbiDHIgXDLF38sH7 xWq1GeSfPeV1M9IY60txwwab4cERwp2EqCIWm8GKc/qcMG8v0I9MIjH4tukwEd9C6tSO BQBZjP5OvS55QcKjvwuqHSrsJY6RP3GWgIv6gXStmxSpr9z8mJ2bW+AmiwmjH7DAIqp7 KO2X+80Lqe9te1V64312gFsUzhH3p6HuJPVHqAm1rz5SyLdENDzM/qfns08/6zdpcT4G 2139tYHWm6+Pcetmqj4ck92a6QXdDGb9a6ed+maP67SnKCZE0+zH61X2ZKuSSqqMe1zI IcBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cZq52Q6rLycH0BAcmoLdhhdQaOL722pQyzzyEkEtNeM=; b=kLh4ChxmUIDKK+EFPlfs0ZsAhwqKmnpPEIbLmwak6+y7MSI7t7ZGjlKebzQZQmJ1Tc E1vIJxrNIbxaxbe1ta8n0lL5a9gWCkbPyFV9JDK1NnUz26GvG/EDYBwhGIM1TxJfxVET RZ9eeFXWPoCCNiz/u79/RhTBHxIVZs6pWhLJ0AatpA3zs85QX1qpG6yzUTll2cW3mB// kN9nYDU7wlYreWawmYqkQKsVP/v8u2HEVBhyLihl7FK9I9RIgzG7rKYU4Mj81fPT2j25 TEmwCrVEyzeUi8pQ2+v2HvS6i3xB80Ebei+pRHeXKuSl994/GkpvbWgZsX2xjYvyvlrK TapQ== X-Gm-Message-State: APjAAAVI1L8uimlh2ep2atzI9K8yLCxUTFDF21QSfKAS1xnzPkMXllGi dDir165R1s69gAM79EwnsGCQIQRCsaIfiiV/LM1Vmhys9YeHndzWInizZ5meCgIiheB/gnL+xXO X1fs9NrrnaP0yW8PXhdrGjhLk20FayIcxiBo0PCPy787uDbeVkgVu153o+El+6uW+ND0is9g1eQ Zwfift2GEJxnynF8R6Mws4wTzP48sYtv1g1OzwI5cM+HgJSQJ9aByEBg== X-Google-Smtp-Source: APXvYqy4ATksil0Aghaz21XX3Y0v1N7ievlanSbSVrQga1+x3BxFDNZPDCtSi/0ChhIdlxsggULGag== X-Received: by 2002:a17:902:6b07:: with SMTP id o7mr11378844plk.141.1579468384571; Sun, 19 Jan 2020 13:13:04 -0800 (PST) Received: from [192.168.0.29] (24-113-193-150.wavecable.com. [24.113.193.150]) by smtp.gmail.com with ESMTPSA id d3sm1012606pjx.16.2020.01.19.13.13.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Jan 2020 13:13:04 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: pgsql: Add a non-strict version of jsonb_set From: Mark Dilger In-Reply-To: <20200119202022.GO32763@fetter.org> Date: Sun, 19 Jan 2020 13:12:58 -0800 Cc: Tom Lane , Andrew Dunstan , Andrew Dunstan , pgsql-committers Content-Transfer-Encoding: quoted-printable Message-Id: <6F023748-BBBD-45EE-9119-E2718AD1D73A@enterprisedb.com> References: <21806.1579227259@sss.pgh.pa.us> <30906.1579304462@sss.pgh.pa.us> <20200119173545.GA30971@fetter.org> <18654.1579455979@sss.pgh.pa.us> <20200119202022.GO32763@fetter.org> To: David Fetter X-Mailer: Apple Mail (2.3608.40.2.2.4) X-CLOUD-SEC-AV-Info: edb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Jan 19, 2020, at 12:20 PM, David Fetter wrote: >=20 > On Sun, Jan 19, 2020 at 12:46:19PM -0500, Tom Lane wrote: >> David Fetter writes: >>> On Fri, Jan 17, 2020 at 06:41:02PM -0500, Tom Lane wrote: >>>> I'd be okay with a hook that there was a way to override ("yes, >>>> I know what I'm doing, this doesn't require a catversion change"). >>>> But there's no way to do that is there? >>=20 >>> I'm pretty sure there is. The program called by the commit hook can >>> prompt the user for input. >>=20 >> ... um, but the commit hook in question would run on the repo server. >> Is there really something in the git protocol that would allow = sending >> this sort of interaction back to the person running "git push"? >=20 > According to the folks I consulted, that would require special magic > on the client side. >=20 > How about something that sent an email or otherwise signaled the > person pushing that this situation obtained? It's not ideal, but it's > centralized, so harder to get inconsistent. >=20 >> I think you are right that individual committers could set up such = hooks >> in their own private repos. But that's not what was being suggested, >> or so I thought. >=20 > Distributing the problem by asking people to have those hooks on their > private repo seems like a suboptimal move. Change dev boxes, and watch > your carefully structured safeguards vanish. I disagree. If you have a committed directory containing hook scripts, = and a script in src/tools that can instantiate the hooks of your choosing in = your development repository, then client-side hooks can be shared between developers without forcing any developer to use any particular hook. I have been annoyed in the past that .git/hooks is not itself under = version control, so shared hook scripts need to go elsewhere for versioning, and = be optionally copied to .git/hooks by some new tool, say = src/tools/make_hooks. =20 Client side hooks of this kind could be useful for developers without community commit privileges, since local repository commits could also = be rejected, perhaps with an =E2=80=9Care you sure=E2=80=9D type override = option, and more than a catversion checking hook would be possible. I have wanted a hook to check code indentation [1], and not all = developers agreed it would be useful enough to be worth the pain of rejecting = commits. If it were a client side hook, and had =E2=80=9Care you sure=E2=80=9D = logic rather than rejecting the commit unconditionally, it might be more popular. Either = way, each developer could opt-in or opt-out as they like when running = make_hooks. Does anybody object to this idea in principle? If not, I can put = something like this together from a similar script I already have lying around. [1] = https://www.postgresql.org/message-id/7825.1511902037%40sss.pgh.pa.us =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company