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

2014-11-02 Thread Tom Lane
rohtodeveloper writes: > I need the convert function because that Our application will be switched > from SQL Server to PostgreSQL. >> For the options you suggested: >> 1) Pass in datatype as string and deparse and process in the function. >> 2) Are you referring to pg_convert here? > 1) is ye

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

2014-11-02 Thread Pavel Stehule
gt; > ------------------ > Date: Sun, 2 Nov 2014 16:00:14 +05 > Subject: Re: [HACKERS] How to implent CONVERT ( data_type [ ( length ) ] , > expression ) function in postgreSQL > From: atri.j...@gmail.com > To: rohtodevelo...@outlook.com > CC: pgsql-hackers@postgre

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

2014-11-02 Thread rohtodeveloper
ame) function. Date: Sun, 2 Nov 2014 16:00:14 +05 Subject: Re: [HACKERS] How to implent CONVERT ( data_type [ ( length ) ] , expression ) function in postgreSQL From: atri.j...@gmail.com To: rohtodevelo...@outlook.com CC: pgsql-hackers@postgresql.org On Sun, Nov 2, 2014 at 3:40 PM, rohtode

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

2014-11-02 Thread Atri Sharma
On Sun, Nov 2, 2014 at 3:40 PM, rohtodeveloper wrote: > > Dear > > > In SQLServer, there'are two functions to converte an expression of one > data type to another. > > 1. CAST ( expression AS data_type [ ( length ) ] ) > 2. CONVERT ( data_type [ ( length ) ] , expression ) > > However, In Postgre

[HACKERS] How to implent CONVERT ( data_type [ ( length ) ] , expression ) function in postgreSQL

2014-11-02 Thread rohtodeveloper
Dear In SQLServer, there'are two functions to converte an expression of one data type to another. 1. CAST ( expression AS data_type [ ( length ) ] )2. CONVERT ( data_type [ ( length ) ] , expression ) However, In PostgreSQL, there's only the CAST ( expression AS data_type [ ( length ) ] ) funct