Wednesday, November 02, 2022

10 Take-aways Moving MSSQL to PostgreSQL

Background: Based on my recent project, here are the 10 takeaways of MS SQL Server to PostgreSQL migration.
  1. Save the operating cost on SQL Server license. 
  2. PGSQL is case sensitive on char comparison. MSSQL is not case-sensitive. Therefore, the where clauses need to be reviewed in Entity Frameworks (EF). However, Entity Frameworks schema mapping is not case sensitive for C# property names on column names. 
  3. PGSQL supports uuid, which is the same as UniqueIdentifier in SQL Server.
  4. PGSQL timestamp without time zone can be used in MSSQL datetime.
  5. PGSQL 'RAISE NOTICE' equals to MSSQL 'PRINT'.
  6. PGSQL support the data type record. I found this very useful in the migration scripts.  (for loop)
  7. PGSQL block supports transaction. (do $$ ... $$) 
  8. PGSQL is very strict on semi-colon (;) for the statement ending.
  9. PGSQL doesn't support table variable.You need to used temp table instead. (temp table)
  10. DBeaver is very useful universal database management tool. 

Be A Developer That Uses AI

Developers will not be replaced by AI, they'll be replaced by developers that use AI. Generative AI tools are revolutionizing the way de...