Re: to_char()?? - Mailing list pgsql-sql

From Szabo Zoltan
Subject Re: to_char()??
Date
Msg-id 3BCAED1C.3090306@mportal.hu
Whole thread Raw
In response to to_char()??  ("guard" <guard@ficnet.net>)
List pgsql-sql
Try: ::text

CoL

guard wrote:

> thanks
> 
> I have run "select substr('hi there', 3, 5)::varchar(5) as xx;"
> but get error message
> Error: ERROR:  parser: parse error at or near ":"
> 
> --
> 
> "Lee Harr" <missive@frontiernet.net> ¼¶¼g©ó¶l¥ó·s»D
> :9qd0j0$1gc3$1@news.tht.net...
> 
>>>how to
>>>select substr('hi there',3,5) as xx   -->>  xx change char type
>>>
>>>
>>How about:
>>
>>select substr('hi there', 3, 5)::varchar(5) as xx;
>>
>>or is this not what you mean?
>>
>>
> 
> 



pgsql-sql by date:

Previous
From: missive@frontiernet.net (Lee Harr)
Date:
Subject: Re: to_char()??
Next
From: "Frank Zhu"
Date:
Subject: Re: VARCHAR vs TEXT