7.2 changes to varchar truncation - Mailing list pgsql-general

From Jeffrey W. Baker
Subject 7.2 changes to varchar truncation
Date
Msg-id Pine.LNX.4.33.0112311357281.5617-100000@windmill.gghcwest.com
Whole thread Raw
Responses Re: 7.2 changes to varchar truncation
List pgsql-general
Given a column of type varchar(n), postgres 7.1 allowed me to insert a
string s of length m where m > n by truncating s.  In 7.2, I get an error:
ERROR:  value too long for type character varying(64).  This is annoying
and breaks practically all of my programs.  The fact that this is
mentioned in the docs doesn't make this suck less.

What do I do to get back the old behavior?

If I have to change my datatypes to text or varchar without a limit, I'll
have to drop and reload my databases (again), about which I plan to have a
real bad attitude.

 -jwb


pgsql-general by date:

Previous
From: "Michael McAlpine"
Date:
Subject: Re: Large Tables/clustering/terrible performance
Next
From: "Jeffrey W. Baker"
Date:
Subject: Re: Large Tables/clustering/terrible performance ofPostgresql