Re: Changing a table column datatype - Mailing list pgsql-novice

From Tom Lane
Subject Re: Changing a table column datatype
Date
Msg-id 6070.1052802493@sss.pgh.pa.us
Whole thread Raw
In response to Re: Changing a table column datatype  (<marshall@perilith.com>)
List pgsql-novice
<marshall@perilith.com> writes:
> Hmmm...  Maybe I haven't explained what I'm trying to do clearly.
> I don't wish to insert new fqdn values into this table, only copy
> the contents of one column (`mycol') into another column (`mycol_new').
> Am I missing something here?

Yes.  You should be using UPDATE not INSERT, viz

    UPDATE mytable SET mycol_new = mycol;

INSERT is for adding new rows.

            regards, tom lane


pgsql-novice by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: Changing a table column datatype
Next
From: "psql novice"
Date:
Subject: Re: Changing a table column datatype