Re: varchar truncation from 7.1 to 7.2

From: nconway(at)klamath(dot)dyndns(dot)org (Neil Conway)
To: terry(at)greatgulfhomes(dot)com
Cc: 'ljb' <lbayuk(at)mindspring(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: varchar truncation from 7.1 to 7.2
Date: 2002-08-03 04:57:35
Message-ID: 20020803045735.GA17270@klamath.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Aug 02, 2002 at 10:04:56PM -0400, terry(at)greatgulfhomes(dot)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(at)rogers(dot)com>
PGP Key ID: DB3C29FC

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Uwe Feldtmann 2002-08-03 08:22:54 select all groups a user belongs to in system tables
Previous Message Martijn van Oosterhout 2002-08-03 04:26:19 Re: very slow updates