View Single Post

   
  #2 (permalink)  
Old 04-10-2008, 10:14 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #2643: Auto trim on insert and update

"Gene Neely" <paul.neely@comcast.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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote