Re: ERROR: value too long for type character

Поиск
Список
Период
Сортировка
Искать
От
Stephan Szabo
Тема
Re: ERROR: value too long for type character
Дата
в 21:00:42
Msg-id
20020521174657.R28822-100000@megazone23.bigpanda.com
Ответ на
Список
Дерево обсуждения
PostgreSQL 7.1 forces sequence scan when there is no reason Denis Perchine <dyp@perchine.com>
Re: PostgreSQL 7.1 forces sequence scan when there is no reason Tom Lane <tgl@sss.pgh.pa.us>
Re: PostgreSQL 7.1 forces sequence scan when there is no reason Denis Perchine <dyp@perchine.com>
Re: PostgreSQL 7.1 forces sequence scan when there is no reason Tom Lane <tgl@sss.pgh.pa.us>
Re: PostgreSQL 7.1 forces sequence scan when there is no reason Denis Perchine <dyp@perchine.com>
ERROR: value too long for type character varying(255) Doug Fields <dfields-pg-general@pexicom.com>
Re: ERROR: value too long for type character varying(255) Neil Conway <nconway@klamath.dyndns.org>
Re: ERROR: value too long for type character varying(255) Jan Wieck <janwieck@yahoo.com>
Re: ERROR: value too long for type character Doug Fields <dfields-pg-general@pexicom.com>
Re: ERROR: value too long for type character Stephan Szabo <sszabo@megazone23.bigpanda.com>
On Tue, 21 May 2002, Doug Fields wrote:

>
> > > Do you know how I can tell it to "silently truncate" the data as I believe
> > > it used to?
> >
> >Is there a reason you can't just use TEXT? It will be stored the same
> >internally...
>
> The only reason being that I don't want to waste space storing arbitrarily
> long pieces of information.
>
> I was not aware that TEXT is just as (in)efficient as VARCHAR, though. If
> that is truly the case, I will consider using TEXT in some places, but only
> when I am very careful in the INSERT and UPDATE clauses so as not to store
> too long things.
>
> >But the most obvious way I can think of to do what you're asking is
> >to define a rule to replace the value inserted with a call to
> >substring().
>
> So, basically:
>
> 1) There's absolutely no way to get back the 7.1.3 "silent truncation"
> behavior (which is, IMO, stupid, I like the non-standard truncation behavior)

You could do this via a text column and a before trigger which might work
better than a rule, but I haven't tried either, so...


В списке pgsql-general по дате отправления
От: Soon-Son Kwon
Дата:
Сообщение: Re: too many idle processes
От: Victor Manuel Torres Aguirre
Дата:
FAQ