Live data from Hacker News

Babelfish: SQL Server-to-Postgres Translation Layer

aws.amazon.com

81–90 of 118 posts

Re: Babelfish: SQL Server-to-Postgres Translation Layer

#81

Earlier quoted context omitted.

> Sounds like they’re open sourcing it to get some help on it. My take is that they are open sourcing it because they don't just want to use it to compete with Microsoft to host SQL Server workloads on a better basis than Microsoft's licensing policy has let them in the past, but also to just undercut Microsoft's SQL Server licensing revenue generally. As a business strategy, sure, but given the way everyone I've hea…

One word: JEDI.

Well, that too, but the antipathy over SQL Server licensing, in particular, seems to have preceded the JEDI award.

Re: Babelfish: SQL Server-to-Postgres Translation Layer

#82

Earlier quoted context omitted.

You might be able to get away with staying with MySQL or a variant. Years ago I did an "interview problem" to generate a report of some accounting data of a sample data set in MySQL. The details are foggy now, but I ended up doing it all using advanced SQL features that I thought only existed in PostgreSQL (you know, or Oracle), but whatever engine I ended up using had it as well. It was probably the latest Percona o…

MySQL has worse guarantees in several cases, though. For example, using `SERIALIZABLE` isolation means your queries can deadlock when run in parallel. Likewise, selecting a column not present in a GROUP BY leads to random values being returned.

MySQL improved a lot in those places.

Re: Babelfish: SQL Server-to-Postgres Translation Layer

#83
post #12

Why not do this for Oracle? I've not found SQL Server to be too bad from the crazy Oracle stuff (light experience only - maybe bigger players have it worse?).

It already exists: https://www.enterprisedb.com/products/edb-postgres-advanced-...

I'm not sure exactly how compatible - I've never had to use it - but EDB has been around for a while and is commercially backed. Plus they employ some core PostgreSQL contributors.

Re: Babelfish: SQL Server-to-Postgres Translation Layer

#84

Don't hate me for it, but I'd like this for MySQL to postgres too. At least as a stepping stone. Use case: some of my SQL syntax depends on MySQL but I realize I made a poor life choice and would rather have transactional DDL and a myriad of better features on postgres.

pgloader does this (and much much more) in a single command:

https://github.com/dimitri/pgloader

  pgloader \
    mysql://user:password@mysql:3306/database \
    postgresql://postgres:root@localhost:5432/postgres
This is a gem of a tool. Surprised nobody has mentioned it. Supports SQLite and MS-SQL too.

https://pgloader.readthedocs.io/en/latest/ref/mysql.html#

Re: Babelfish: SQL Server-to-Postgres Translation Layer

#85
post #40

Earlier quoted context omitted.

Not the GP but yes I've seen a lot of folks go through the Data tab in Excel and connect to a SQL database to display data directly.

Excel can connect to PostgreSQL as well.

Yes but not with the same ease :)

Re: Babelfish: SQL Server-to-Postgres Translation Layer

#86
post #40
post #28

Earlier quoted context omitted.

What does “connect” mean in this context? Read data from SQL server into an excel spreadsheet?

Not the GP but yes I've seen a lot of folks go through the Data tab in Excel and connect to a SQL database to display data directly.

Exactly that. It's a nightmare to maintain but business types seem to demand it.

Re: Babelfish: SQL Server-to-Postgres Translation Layer

#87

Don't hate me for it, but I'd like this for MySQL to postgres too. At least as a stepping stone. Use case: some of my SQL syntax depends on MySQL but I realize I made a poor life choice and would rather have transactional DDL and a myriad of better features on postgres.

pgloader does this (and much much more) in a single command: https://github.com/dimitri/pgloader pgloader \ mysql://user:password@mysql:3306/database \ postgresql://postgres:root@localhost:5432/postgres This is a gem of a tool. Surprised nobody has mentioned it. Supports SQLite and MS-SQL too. https://pgloader.readthedocs.io/en/latest/ref/mysql.html#

Absolutely, absolute love pgloader! So painless and quite straightforward. Saved me lots of time migrating my production db. Highly, highly recommend if anyone wants to migrate from MySQL to PG!

Re: Babelfish: SQL Server-to-Postgres Translation Layer

#88
post #8
post #6

Earlier quoted context omitted.

Correct. The focus is on 100% correctness. As I wrote in the post: "Over its 35 years in existence, SQL Server has evolved to meet a wide array of use cases. When first made available on GitHub, Babelfish won’t be able to handle every use case, but will be able to tackle the most common application scenarios. Most importantly, Babelfish will meet the correctness objective. That is, if Babelfish doesn’t yet support sp…

Interesting. Now where's the Oracle-to-Postgres Translation project? ;-)

[deleted]

Re: Babelfish: SQL Server-to-Postgres Translation Layer

#89
post #12

Why not do this for Oracle? I've not found SQL Server to be too bad from the crazy Oracle stuff (light experience only - maybe bigger players have it worse?).

As a DBA, T-SQL is much more standard then PL/SQL. Its probably step 1 of the plan, with step 2 being Oracle.

Isn't SQL/PSM the standard? And PL/SQL older than them all? (Hence Postgres providing PL/pgSQL)

Re: Babelfish: SQL Server-to-Postgres Translation Layer

#90

Don't hate me for it, but I'd like this for MySQL to postgres too. At least as a stepping stone. Use case: some of my SQL syntax depends on MySQL but I realize I made a poor life choice and would rather have transactional DDL and a myriad of better features on postgres.

https://aws.amazon.com/about-aws/whats-new/2016/04/aws-schem...
Post reply on HN