Re: Automatic value truncation during update

Lists: pgsql-general
From: "Glen Parker" <glenebob(at)nwlink(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Automatic value truncation during update
Date: 2002-06-03 18:36:09
Message-ID: 011301c20b2d$8832a710$0b01a8c0@johnpark.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Postgres 7.1.* and before I believe would silently truncate values to
fit into their destination fields during insert/update, but 7.2.* gives
an error when values are too long. I realize the new behavior is
probably more correct, but I grew accustom to the old behavior and now
have queries that rely on that behavior, for better or worse. I don't
see a way to get pgsql to use the old behavior. Am I missing it or is
it really not there?

Glen Parker
glenebob(at)nwlink(dot)com


From: Doug Fields <dfields-pg-general(at)pexicom(dot)com>
To: "Glen Parker" <glenebob(at)nwlink(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Automatic value truncation during update
Date: 2002-06-03 20:06:36
Message-ID: 5.1.0.14.2.20020603160555.029c3ff8@mail.pexicom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

At 02:36 PM 6/3/2002, Glen Parker wrote:
>Postgres 7.1.* and before I believe would silently truncate values to
>fit into their destination fields during insert/update, but 7.2.* gives
>an error when values are too long. I realize the new behavior is
>probably more correct, but I grew accustom to the old behavior and now
>have queries that rely on that behavior, for better or worse. I don't
>see a way to get pgsql to use the old behavior. Am I missing it or is
>it really not there?

Having just gone through this: It's really not there.

Check the archives for the last month or two for all the work-arounds
suggested. The easy way out is to use TEXT fields.

Cheers,

Doug