Re: DDL and DML in a transaction

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "Igal (at) Lucee(dot)org" <igal(at)lucee(dot)org>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: DDL and DML in a transaction
Date: 2019-07-31 18:52:34
Message-ID: CAKFQuwZBy38L5X06WHMeFhMU03OmdSF8KTMMnJg6JLRu3=065g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jul 31, 2019 at 11:38 AM Igal @ Lucee.org <igal(at)lucee(dot)org> wrote:

> alter table some_table
> rename column amount_num to amount_text;
>
> alter table some_table
> drop column amount_num;
>

You just renamed amount_num to amount_text so I'm not sure why you expect
the drop to succeed.

Would it have less locking than simply altering the column?
>

I doubt anything will improve upon simply altering the column. You have to
perform a full table rewrite in either case which is going to be the main
resource consumer.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igal @ Lucee.org 2019-07-31 19:57:32 Re: DDL and DML in a transaction
Previous Message Igal @ Lucee.org 2019-07-31 18:38:39 DDL and DML in a transaction