7.2 changes to varchar truncation

From: "Jeffrey W(dot) Baker" <jwbaker(at)acm(dot)org>
To: <pgsql-general(at)postgresql(dot)org>
Subject: 7.2 changes to varchar truncation
Date: 2001-12-31 22:04:03
Message-ID: Pine.LNX.4.33.0112311357281.5617-100000@windmill.gghcwest.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-12-31 22:14:06 Re: Large Tables/clustering/terrible performance
Previous Message Jeffrey W. Baker 2001-12-31 21:51:58 Re: Large Tables/clustering/terrible performance ofPostgresql