VARCHAR truncation

Поиск
Список
Период
Сортировка
От David Wall
Тема VARCHAR truncation
Дата
Msg-id arbugv$14vr$1@news.hub.org
обсуждение исходный текст
Список pgsql-general
Is there a way in a table with, for example, a VARCHAR(250) to have it
truncate any string I send that's longer?  Right now, it throws an
exception: ERROR:  value too long for type character varying(250)

I'd prefer that my mainline code doesn't know about the lengths of strings
in the database because they sometimes vary depending on the db backend
(Oracle only allows one LONG string, for example, so if my PG has two, these
are often ported as under Oracle as two VARCHAR2 fields).

Thanks,
David



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

Предыдущее
От: * Tong *
Дата:
Сообщение: Re: Authorise root as postgres
Следующее
От: "David Wall"
Дата:
Сообщение: Re: VARCHAR truncation