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 1itEUK-0002WL-Fn for pgsql-committers@arkaria.postgresql.org; Sun, 19 Jan 2020 17:35:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1itEUJ-0000zy-7I for pgsql-committers@arkaria.postgresql.org; Sun, 19 Jan 2020 17:35:51 +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 1itEUI-0000zq-F7 for pgsql-committers@lists.postgresql.org; Sun, 19 Jan 2020 17:35:51 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1itEUF-00084U-L2 for pgsql-committers@lists.postgresql.org; Sun, 19 Jan 2020 17:35:49 +0000 Received: by fetter.org (Postfix, from userid 1001) id C28DF40975; Sun, 19 Jan 2020 18:35:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fetter.org; s=default; t=1579455345; bh=lrG7CwDoWHUhl4EsVjIZo1HcwaWPIZWJfs9tVy1UqUE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yV50cfTANS5QRq0y2YPmzreQHeWovq4thfNqwA7gCh29ZNW0pBzL6EuyY3e/7EJvh dYTa8k7ROFu4IlUYRhxmPJKWrsZeuEsifHjQgRdKzmNNefrjT6smJT48ywOF4vx9+g m7BS+GTFu5qJD6JiJpBLFhAHwMMOrFoQEw89oK6rqVyZybinbZZ2Dv5z8qpaN0iryM mvLgUlnAxOMKuOmehTOCs+OmzKNpsS2qF7UQeQyxW7vR6mgugErUykHLVxm3xsBaYr Sb3Qa6RBpPWwNHm5o5A1o9y5X7zZyD111KssvgSl2SWjeF7W8oNEvEwLj7ZLQxKM3L kxRGBWZWYA9ow== Date: Sun, 19 Jan 2020 18:35:45 +0100 From: David Fetter To: Tom Lane Cc: Andrew Dunstan , Andrew Dunstan , pgsql-committers Subject: Re: pgsql: Add a non-strict version of jsonb_set Message-ID: <20200119173545.GA30971@fetter.org> References: <21806.1579227259@sss.pgh.pa.us> <30906.1579304462@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <30906.1579304462@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Jan 17, 2020 at 06:41:02PM -0500, Tom Lane wrote: > Andrew Dunstan writes: > >> On Jan 17, 2020, at 12:44 PM, Tom Lane wrote: > >>> Shoulda been a catversion bump in here, if only for protocol's sake. > > > I'd love to have a git pre-commit hook that would warn about this, it > > seems to happen several times a year, and I know I've transgressed > > more than once. Not sure what the rules should be, something like if > > you changed src/include/catalog/* but not > > src/include/catalog/catversion.h ? > > Meh. I think that would lead to forced catversion bumps even when > not necessary (ex: when just correcting description strings). > The cure could easily be worse than the disease. > > In reality, the only reason for repeated catversion bumps during > development is to warn fellow developers that they have to do > an initdb after a git pull. That's certainly a valuable courtesy, > but the sky generally isn't going to fall if you forget. > > 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? I'm pretty sure there is. The program called by the commit hook can prompt the user for input. Something that says Are you sure you want to push this without a catalog bump? (N/y) with the corresponding machinery for defaults would do it. Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate