Typcasting

Поиск
Список
Период
Сортировка
От Chris Boget
Тема Typcasting
Дата
Msg-id 015001c2b5a2$470ed900$8c01a8c0@ENTROPY
обсуждение исходный текст
Ответ на How to Implement Versioned Rows in PostgreSQL?  (Alan Gutierrez <ajglist@izzy.net>)
Ответы Re: Typcasting  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
I have a field in my table that is of type varchar.  I'm trying
to do a bit of tidying up and since that field contains only
number, I want to convert the field to an integer type.  So I
create a new table and modify/remove the fields as necessary
and then move the relevant data over to the new table.  But
when I try to insert the field that I modified from varchar to
integer, I get an error because the type of data doesn't match
up.  I'm told that I need to cast the value manually.
I've looked up the CAST function and tried everything that I
could think of but nothing seems to work.  I can't, for the life
of me, move the data over.
I can I cast a field value?  Is there any other way to do what
I'm trying to do?

Chris


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to Implement Versioned Rows in PostgreSQL?
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: How to insert into another db instance in pl/plsql...