Re: 7.2 changes to varchar truncation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 7.2 changes to varchar truncation
Дата
Msg-id 14517.1009837389@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 7.2 changes to varchar truncation  ("Jeffrey W. Baker" <jwbaker@acm.org>)
Список pgsql-general
"Jeffrey W. Baker" <jwbaker@acm.org> writes:
> What do I do to get back the old behavior?

You don't.  Unfortunately, SQL92 specifies the new behavior.

You might think about declaring the columns plain text and using
triggers to do the truncation, if you really want truncation to a
length limit.

> 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.

Consider hacking pg_attribute.atttypmod or pg_attribute.atttypid, if the
reload time is too daunting.  (However, if you failed to reload your
data because of this error, it seems like you aren't in position to
avoid a reload anyway...)

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Large Tables/clustering/terrible performance
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: 7.2 changes to varchar truncation