Re: Updating column default values in code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brad White <b55white(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Updating column default values in code
Date: 2023-01-07 05:13:05
Message-ID: 3392165.1673068385@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Brad White <b55white(at)gmail(dot)com> writes:
> On Wednesday, December 28, 2022, Brad White <b55white(at)xxxxxxxxx> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ranjith Paliyath 2023-01-07 05:33:33 RE: Purging few months old data and vacuuming in production
Previous Message Brad White 2023-01-07 04:14:47 Re: Updating column default values in code