Re: Modifying database schema without losing data

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Modifying database schema without losing data
Date: 2020-09-28 18:05:49
Message-ID: alpine.LNX.2.20.2009281104090.31537@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 28 Sep 2020, Adrian Klaver wrote:

> You could use INSERT INTO location(new_fields,) SELECT the_fields FROM
> the_table(s).

Well, duh! I could have thought of that. That's exactly what I'll do:

Create the new table, move data from the old table into it, then drop
columns in the old table ... after checking all data's there.

Thanks, Adrian.

Stay well,

Rich

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Reid Thompson 2020-09-28 18:11:18 Re: re PG 9.6x and found xmin from before relfrozenxid and removal of pg_internal.init file(s)
Previous Message Adrian Klaver 2020-09-28 18:02:16 Re: Modifying database schema without losing data