Re: create new field

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: create new field
Дата
Msg-id 20031006165609.GC27925@wolff.to
обсуждение исходный текст
Ответ на create new field  ("Chris Faulkner" <chrisf@oramap.com>)
Ответы monitor sessions  ("Chris Faulkner" <chrisf@oramap.com>)
Список pgsql-sql
On Mon, Oct 06, 2003 at 17:35:11 +0100, Chris Faulkner <chrisf@oramap.com> wrote:
> 
> OK - so I tried casting.
> 
> template1=# update tab set new_col = "OLD_COL"::int4;
> ERROR:  Cannot cast type character to integer
> 
> I understand this - some tables might have characters in the varchar but how
> to get around it in my case ? I know that my character field has only
> integers in it ?

You want to use to_number to do the conversion.


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: create new field
Следующее
От: ow
Дата:
Сообщение: Re: FK Constraints, indexes and performance