Re: Changing a table column datatype

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Changing a table column datatype
Дата
Msg-id 6070.1052802493@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Changing a table column datatype  (<marshall@perilith.com>)
Список 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 по дате отправления:

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: Changing a table column datatype
Следующее
От: "psql novice"
Дата:
Сообщение: Re: Changing a table column datatype