Re: BUG #2643: Auto trim on insert and update

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gene Neely" <paul(dot)neely(at)comcast(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2643: Auto trim on insert and update
Date: 2006-09-24 23:25:17
Message-ID: 13107.1159140317@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Gene Neely" <paul(dot)neely(at)comcast(dot)net> writes:
> I have found no way to automatically trim fields to the length of the
> varchar or char on inserts and updates.

Write an explicit cast to varchar(N) or whatever it is.

> Can this become a Configuration option???

No, because the behavior is required by the SQL standard.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-09-25 00:05:40 Re: BUG #2645: pg_restore crashes
Previous Message Richard Troy 2006-09-24 22:08:05 Re: BUG #2648: I can not create table name with capital and