Re: Truncation error

Lists: pgsql-general
From: terry(at)greatgulfhomes(dot)com
To: "Postgres (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Truncation error
Date: 2002-07-03 14:25:03
Message-ID: 000601c2229d$6c8a2d80$2766f30a@development.greatgulfhomes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

I upgraded to the new database, 7.2.1 from 7.0

Things are working good, except one bad hitch. If I try to insert 75
characters into 60 character field I get:
ERROR: value too long for type character(60).

Is there a flag somewhere I can set to make the database go back to the old
behavior of blindly truncating the values upon insertion?

Terry Fielder
Network Engineer
Great Gulf Homes / Ashton Woods Homes
terry(at)greatgulfhomes(dot)com


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: terry(at)greatgulfhomes(dot)com
Cc: "Postgres (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Truncation error
Date: 2002-07-03 16:26:16
Message-ID: 200207031626.g63GQGG14057@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

terry(at)greatgulfhomes(dot)com wrote:
> I upgraded to the new database, 7.2.1 from 7.0
>
> Things are working good, except one bad hitch. If I try to insert 75
> characters into 60 character field I get:
> ERROR: value too long for type character(60).
>
> Is there a flag somewhere I can set to make the database go back to the old
> behavior of blindly truncating the values upon insertion?

No, sorry, the SQL standard requires the error.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026