Neil Conway <neilc@samurai.com> writes:
> On Thu, 2002-12-19 at 16:07, Williams, Travis L, NPONS wrote:
>> I want it to insert everything up to 20 chars then drop the rest..
> Then call substring() on the value you're inserting to chop it down to
> 20 chars or less.
Or do an explicit cast. 'foobar'::varchar(3) produces 'foo' (in 7.3
anyway), whereas assigning 'foobar' directly to a varchar(3) column
produces an error. Yeah, it's a little weird, but by my reading of
the SQL spec, that's the spec-mandated behavior.
regards, tom lane