Re: Change in casting behavior? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Change in casting behavior?
Date
Msg-id Pine.LNX.4.30.0202152033550.681-100000@peter.localdomain
Whole thread Raw
In response to Change in casting behavior?  (Thomas Swan <tswan-lst@ics.olemiss.edu>)
List pgsql-hackers
Thomas Swan writes:

> select (random( )*10)::varchar(4)
> worked in 7.1.3
>
> fails in 7.2
>
> ERROR:  value too long for type character varying(4)

Say what you really mean:

select substring(random()*10 for 4);

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Thomas Swan
Date:
Subject: Change in casting behavior?
Next
From: Peter Eisentraut
Date:
Subject: Re: Maintaining the list of release changes