Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pE1W4-000235-MP for pgsql-general@arkaria.postgresql.org; Sat, 07 Jan 2023 05:13:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pE1W2-000556-Vi for pgsql-general@arkaria.postgresql.org; Sat, 07 Jan 2023 05:13:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pE1W2-00054w-LD for pgsql-general@lists.postgresql.org; Sat, 07 Jan 2023 05:13:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pE1Vz-0004xk-TS for pgsql-general@lists.postgresql.org; Sat, 07 Jan 2023 05:13:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3075D58v3392166; Sat, 7 Jan 2023 00:13:05 -0500 From: Tom Lane To: Brad White cc: pgsql-general@lists.postgresql.org Subject: Re: Updating column default values in code In-reply-to: References: Comments: In-reply-to Brad White message dated "Fri, 06 Jan 2023 17:31:48 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3392164.1673068385.1@sss.pgh.pa.us> Date: Sat, 07 Jan 2023 00:13:05 -0500 Message-ID: <3392165.1673068385@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Brad White writes: > On Wednesday, December 28, 2022, Brad White wrote: >> On timestamp fields, I need to update the column default from the current >> "Now()" to "LOCALTIMESTAMP(0)" > I'm still suffering here. I don't understand why a script to generate ALTER VIEW v ALTER COLUMN c SET DEFAULT LOCALTIMESTAMP(0) commands doesn't do what you need? regards, tom lane