Re: please review source(SQLServer compatible)‏

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: rohtodeveloper <rohtodeveloper(at)outlook(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: please review source(SQLServer compatible)‏
Date: 2014-06-23 15:20:17
Message-ID: 53A845B1.5030207@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 06/23/2014 10:51 AM, rohtodeveloper wrote:
> Dear all,
>
> Our application will be switched from SQL Server to PostgreSQL.
> However, a few functions are not supported yet. So we decided to
> extend it.
>
> The functions are as following:
>
> 1.SQL statement support
> INSERT statement without INTO keyword
> DELETE statement without FROM keywork
> 2.Build-in function
> SQUARE
> CHAR
> CHARINDEX
> LEN
> REPLICATE
> SPACE
> STR
> STUFF
> CONVERT
> DATALENGTH
> DATEADD
> DATEDIFF
> DATEPART
> DAY
> MONTH
> YEAR
> EOMONTH
> GETDATE
> SYSDATETIME
> 3.Operator
> operator !< (Not Less Than)
> operator !> (Not Greater Than)
> operator + (String Concatenation)
> 4.Other
> DataType support(smalldatetime,datetime,datatime2,uniqueidentifer)
> Date, Time, and Timestamp Escape Sequences ODBC Scalar Functions
> OCTET_LENGTH
> CURRENT_DATE
> CURRENT_TIME
>
> The extended functions are almost completed but your opinion is very
> important to us.
> Would you please help us to review the extended source?
>
> The attachments is the diff source.
>
> Thank you very much.
>
>

I think this effort is fundamentally misguided. It will mean a
maintenance nightmare for you. You would be much better off migrating
your app to rid it of these SQLServerisms, especially those that require
backend changes. If you have layered your application correctly, so that
the places it calls SQL are relatively confined, then this should not be
terribly difficult. If you have not, then you have bigger problems than
these anyway.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-06-23 15:28:32 Re: replication identifier format
Previous Message Robert Haas 2014-06-23 15:19:44 Re: replication commands and log_statements