Re: varchar truncation from 7.1 to 7.2 - Mailing list pgsql-general

From nconway@klamath.dyndns.org (Neil Conway)
Subject Re: varchar truncation from 7.1 to 7.2
Date
Msg-id 20020803045735.GA17270@klamath.dyndns.org
Whole thread Raw
In response to Re: varchar truncation from 7.1 to 7.2  (terry@greatgulfhomes.com)
Responses Re: varchar truncation from 7.1 to 7.2  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
On Fri, Aug 02, 2002 at 10:04:56PM -0400, terry@greatgulfhomes.com wrote:
> I agree, I had the same last minute scramble to make apps work with the no
> longer silent truncation.

I think one area that could be improved is a clear listing of
client-visible incompatibilities in the release notes (AFAIK we might
have a 1-line 'Raise error on long varchar' line in HISTORY, but not
a lot more than that).

> Is it possible to have a flag in the config file to make the silent
> truncation enabled?

I'm not sure I see the point of this. Most of the people who would have
been effected by this change have upgraded months ago, and presumambly
fixed their applications. Also, the "silent truncation" behavior is
*very bad* -- if PostgreSQL allows a transaction to commit without
raising an error, it is guaranteeing that the content of the
insertion has been stored successfully. Truncating the input without
so much as a warning violates that. Finally, if your application
doesn't have a legitimate constraint on the size of the field, you
should probably use TEXT anyway.

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: very slow updates
Next
From: Uwe Feldtmann
Date:
Subject: select all groups a user belongs to in system tables