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

From Peter Eisentraut
Subject Re: Casting numeric to text
Date
Msg-id Pine.LNX.4.30.0104081205320.1236-100000@peter.localdomain
Whole thread Raw
In response to Casting numeric to text  (Hans-Jürgen Schönig <hs@cybertec.at>)
Responses Re: Casting numeric to text  (Cedar Cox <cedarc@visionforisrael.com>)
List pgsql-sql
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.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-sql by date:

Previous
From: Joel Burton
Date:
Subject: Re: Can anyone explain how this works?
Next
From: Louis-David Mitterrand
Date:
Subject: Re: [GENERAL] Re: Permissons on database