Re: Add columns to table; insert values based on row - Mailing list pgsql-general

From Rich Shepard
Subject Re: Add columns to table; insert values based on row
Date
Msg-id alpine.LNX.2.20.1811011451560.13759@salmo.appl-ecosys.com
Whole thread Raw
In response to Add columns to table; insert values based on row  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Add columns to table; insert values based on row
List pgsql-general
On Fri, 2 Nov 2018, Tim Cross wrote:

> 3. Is it really insert or update you need?

Tim,

   Update.

   It's been a long time since I did any database manipulation (I just use
the existing databases as each project needs its data) so I sometimes make
these types of mistakes.

   Your idea of manipulating a text file is a great one!

   I'll use gawk to extract the relevant fields from the text file in which
they reside (in the correct order), then use emacs keyboard macros to add
the appropriate update text to each line. Must more efficient (and less
tedious) than manually writing each line.

Thanks,

Rich


pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: Truncation of UNLOGGED tables upon restart.
Next
From: Stephen Frost
Date:
Subject: Re: Truncation of UNLOGGED tables upon restart.