Re: Casting numeric to text - Mailing list pgsql-sql

From Cedar Cox
Subject Re: Casting numeric to text
Date
Msg-id Pine.LNX.4.21.0104090218440.7109-100000@nanu.visionforisrael.com
Whole thread Raw
In response to Re: Casting numeric to text  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Casting numeric to text
List pgsql-sql

On Sun, 8 Apr 2001, Peter Eisentraut wrote:

> Hans-Jürgen Schönig writes:
> 
> > Is there any possibility to cast numeric to text in Postgres 7.0.3?
> >
> > shop=# select cast(price as text) from products;
> > ERROR:  Cannot cast type 'numeric' to 'text'
> 
> Use the to_char() function.

When would one want to use cast()?  What is the difference between cast
and :: ?  After a quick look in the documentation I couldn't find
anything..

-Cedar



pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: open and closed paths ...
Next
From: Cedar Cox
Date:
Subject: Re: Need help with EXECUTE function