Search Postgresql Archives

Re: How to implent the CONVERT ( data_type [ ( length ) ] , expression ) function in PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El 02/11/14 a las 07:15, rohtodeveloper escibió:
> Dear
>
> I'm doing a job about converting an expression of one data type to
> another.
> In SQLServer, there'are two functions to do this job.
>

>From which data_type to which one?  In psql, the option \dC, will give
you the list of supported casts.

Did you try the cast operand?

postgres=# select '1235'::int , 823::text, (now()::date)::text;
 int4 | text |    now    
------+------+------------
 1235 | 823  | 2014-11-02
(1 row)



-- 
--
Emanuel Calvo                 http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux