"migrating mysql to postgresql - what features not visible in sql code will be important?" Code Answer

4
  • select count(*) from table;

    will be slow, as it needs to read entire table. it needs workarounds if you need to count big tables often. this is needed to ensure multiversion concurrency control.

  • in the latest version (8.3) there's no implicit cast to text, which means that for example

    select 234 like '2%';

    will throw error. you'll need explicit cast like:

    select 234::text like '2%';

  • update is really a delete+insert. as space used by deleted rows is not immediately freed then if you update entire table in one transaction then you'll need double the space.

postgresql is a very good database, you'll love it in no time. it has several very useful features that you'll then miss in other, even commercial databases. for example transactional data definition language or savepoints.

By JackF on July 9 2022

Answers related to “migrating mysql to postgresql - what features not visible in sql code will be important?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.