Re: Changing column question..

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Changing column question..
Дата
Msg-id 7357.1040338828@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Changing column question..  (Neil Conway <neilc@samurai.com>)
Список pgsql-general
Neil Conway <neilc@samurai.com> writes:
> On Thu, 2002-12-19 at 16:07, Williams, Travis L, NPONS wrote:
>> I want it to insert everything up to 20 chars then drop the rest..

> Then call substring() on the value you're inserting to chop it down to
> 20 chars or less.

Or do an explicit cast.  'foobar'::varchar(3) produces 'foo' (in 7.3
anyway), whereas assigning 'foobar' directly to a varchar(3) column
produces an error.  Yeah, it's a little weird, but by my reading of
the SQL spec, that's the spec-mandated behavior.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: trouble caused by change in 7.3 handling of '' in
Следующее
От: "Ian Harding"
Дата:
Сообщение: Re: trouble caused by change in 7.3 handling of ''