Re: please review source(SQLServer compatible)‏ - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: please review source(SQLServer compatible)‏
Date
Msg-id 53A845B1.5030207@dunslane.net
Whole thread Raw
In response to please review source(SQLServer compatible)‏  (rohtodeveloper <rohtodeveloper@outlook.com>)
Responses Re: [HACKERS] please review source(SQLServer compatible)‏  (Kevin Grittner <kgrittn@ymail.com>)
List 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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: replication commands and log_statements
Next
From: Heikki Linnakangas
Date:
Subject: Re: Minmax indexes