Re: BUG #2643: Auto trim on insert and update - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #2643: Auto trim on insert and update
Date
Msg-id 13107.1159140317@sss.pgh.pa.us
Whole thread Raw
In response to BUG #2643: Auto trim on insert and update  ("Gene Neely" <paul.neely@comcast.net>)
List pgsql-bugs
"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

pgsql-bugs by date:

Previous
From: Richard Troy
Date:
Subject: Re: BUG #2648: I can not create table name with capital and
Next
From: Tom Lane
Date:
Subject: Re: BUG #2645: pg_restore crashes