DEV Community

Discussion on: SQL Review - Differences Between MySQL and PostgreSQL

aarone4 profile image
Aaron Reese

Postgres, MySQL, MS-SQL, SQLite and Oracle all implement the ANSI-92 standards but also have proprietary extensions as you have discovered. If you want your database code to be portable between platforms you need to stick to the ANSI standards but I have never seen it in real life. The cost of delevoping portable database code is probably more expensive than refactoring when a migration is required and you will lose out on platform specific optimisations

darkain profile image
Vincent Milum Jr

The other option is to abstract away the SQL queries with a generator that is acutely aware of subtleties in different database systems. That's one of the main goals of PUDL! :)