text and varchar

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема text and varchar
Дата
Msg-id Pine.LNX.4.44.0407211748080.2838-100000@zigo.dhs.org
обсуждение исходный текст
Список pgsql-hackers
Why do we have both the type text and type varchar (without limit)?  
Couldn't we make one to be an alias for the other?

Since it's 2 distinct types there are some strange effects:
 dennis=> SELECT CAST ('123'::varchar AS integer); ERROR:  cannot cast type character varying to integer
 dennis=> SELECT CAST ('123'::text AS integer);  int4 ------   123

Sure, the cast is simple to fix. But why do we have two types in the first 
place?

-- 
/Dennis Björklund



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [JDBC] V3 protocol + DECLARE problems
Следующее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Re: check point segments leakage ?