How to make silently truncate for char type - Mailing list pgsql-general

From Terence Leung
Subject How to make silently truncate for char type
Date
Msg-id 20021208120154.10496.qmail@web40705.mail.yahoo.com
Whole thread Raw
Responses Re: How to make silently truncate for char type  ("Daniel Morgan" <danmorg@sc.rr.com>)
Re: How to make silently truncate for char type  (Aasmund Midttun Godal <postgresql@aasmund.com>)
List pgsql-general
I upgraded postgresql 7.1 to 7.2 and found that many
sql cannot execute because version 7.2 does not
silently truncate the string for char(n) type during
insert a new row.
e.g. insert t (field1) value ('abcdef');
     where field1 is char(5) but I insert the string
has 6 characters.

How can I solve the problem except downgrade the
Postgresql?

Looking forward to your reply!!!

=====
Yours sincerely,
    Leung Chun Man, Terence

    Mobile: (852) 9273 9176
    Homepage:  http://tcmleung.uhome.net ,
    http://www.dynamicdrive.com/dynamicindex4/filter/index.htm

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

pgsql-general by date:

Previous
From: pginfo
Date:
Subject: pg 7.3 crash
Next
From: "Daniel Morgan"
Date:
Subject: Re: How to make silently truncate for char type