Re: 7.2 changes to varchar truncation

Поиск
Список
Период
Сортировка
От Ian Harding
Тема Re: 7.2 changes to varchar truncation
Дата
Msg-id sc397ea3.010@mail.tpchd.org
обсуждение исходный текст
Ответ на 7.2 changes to varchar truncation  ("Jeffrey W. Baker" <jwbaker@acm.org>)
Ответы Re: 7.2 changes to varchar truncation  (Andrew Sullivan <andrew@libertyrms.info>)
Список pgsql-general
This brings up an interesting question, is there a reason to specify n?  In other words, what is the downside of
VARCHARcompared to VARCHAR(n)?  I will have the same problem soon, so I may change all of mine to plain old VARCHAR now
ifit makes sense... 

Ian A. Harding
Programmer/Analyst II
Tacoma-Pierce County Health Department
(253) 798-3549
mailto: iharding@tpchd.org

>>> "Jeffrey W. Baker" <jwbaker@acm.org> 12/31/01 02:04PM >>>
Given a column of type varchar(n), postgres 7.1 allowed me to insert a
string s of length m where m > n by truncating s.  In 7.2, I get an error:
ERROR:  value too long for type character varying(64).  This is annoying
and breaks practically all of my programs.  The fact that this is
mentioned in the docs doesn't make this suck less.

What do I do to get back the old behavior?

If I have to change my datatypes to text or varchar without a limit, I'll
have to drop and reload my databases (again), about which I plan to have a
real bad attitude.

 -jwb


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


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

Предыдущее
От: "Aniket Kulkarni"
Дата:
Сообщение: Integrating ADSM
Следующее
От: Marc Munro
Дата:
Сообщение: Question about rules and permissions