Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS bad?)

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, mischa(at)ca(dot)sophos(dot)com
Subject: Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS bad?)
Date: 2006-05-22 15:02:38
Message-ID: 20060522150237.GL64371@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-hackers

On Sun, May 21, 2006 at 02:58:17PM -0700, Josh Berkus wrote:
> Mischa,
>
> > Somebody earlier was mentioning, why no automatic transformer from
> > Transact-SQL to PLPGSQL (maybe with a bunch of glue routines). The grammar
> > is not a problem, though you have to wonder at all the wired-in keywords
> > (T-SQL always felt like COBOL).
>
> Actually, porting TSQL to PL/pgSQL would be very hard. I speak as an expert
> TSQL developer. For example, most data manipulation in TSQL is done through
> updatable cursors, something we don't currently support. Also, T-SQL uses
> un-ordered, callable parameters for SPs, something which we *also* don't
> support.

And TSQL doesn't fail a transaction on an error, resulting in code like

UPDATE ...

if @@error = 0 then
UPDATE ...
end
if @@error = 0 then
...

Makes for a lot of needless bloat when going to PostgreSQL. Supposedly
this is changed in MSSQL05 though.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-05-22 15:06:47 Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS bad?)
Previous Message Jim C. Nasby 2006-05-22 15:00:22 Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS bad?)

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-05-22 15:06:47 Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS bad?)
Previous Message Jim C. Nasby 2006-05-22 15:00:22 Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS bad?)