Change in casting behavior?

Thomas Swan <tswan-lst@ics.olemiss.edu>

From: Thomas Swan <tswan-lst@ics.olemiss.edu>
To: Postgresql Hackers <pgsql-hackers@postgresql.org>
Date: 2002-02-16T00:49:33Z
Lists: pgsql-hackers
select (random( )*10)::varchar(4)
worked in 7.1.3

fails in 7.2

ERROR:  value too long for type character varying(4)