Truncation error

Started by Terry Fielderalmost 24 years ago2 messagesgeneral
Jump to latest
#1Terry Fielder
terry@greatgulfhomes.com

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@greatgulfhomes.com

#2Bruce Momjian
bruce@momjian.us
In reply to: Terry Fielder (#1)
Re: Truncation error

terry@greatgulfhomes.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@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026