How to make silently truncate for char type

From: Terence Leung <tcmleung(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to make silently truncate for char type
Date: 2002-12-08 12:01:54
Message-ID: 20021208120154.10496.qmail@web40705.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Morgan 2002-12-08 12:19:13 Re: How to make silently truncate for char type
Previous Message pginfo 2002-12-08 10:02:35 pg 7.3 crash