skip to Main Content

I’ve encountered into a connection issue between PostgreSQL 15 and Navicat 15.

My environment is:

  • Windows 10
  • PostgreSQL 15
  • Navicat Premium 15.0.16 (Activated)

How to produce:

  • Open ‘New Connection’ dialog. (Files -> New Connection -> PostgreSQL…)
  • Put information in fields.
  • Check if ‘Test Connection’ works. (It works on my end as well.)
  • Click ‘OK’
  • In the list of connections, double-click the connection.

Expected:
Should be able to open the connection.

Actual:
It says the following message on an error dialog.

ERROR: column "datlastsysoid" does not exist
LINE 1: SELECT DISTINCT datlastsysoid FROM pg_database

2

Answers


  1. The error goes away if you upgrade to latest Navicat version. Version 16.1.5 definitely fixes this issue.

    Login or Signup to reply.
  2. Postgres 15 removed datlastsysoid field from pg_database table, so any version prior to Navicat 15.0.29 or 16.1 will raise this error while looking for this deprecated field.

    To fix this, either upgrade to the latest Navicat 15.0.29 or 16.1 and up (might require new license), or do this:

    1. Exit Navcat.
    2. Open Navicat folder (usually under C:Program FilesPremiumSoftNavicat….), depends on your Navicat edition
    3. Locate libcc.dll and create a backup of this file (copy and paste it as "libcc-backup.dll" or any other name)
    4. Open this file in any HEX editor, you can use online tool such as https://hexed.it/ if you want.
    5. Search for "SELECT DISTINCT datlastsysoid" in the file, and replace it with "SELECT DISTINCT dattablespace"
    6. Save the file in the original location. If you get any security issues, save it as ".txt" file, and then rename it to ".dll"
    7. That’s it! Navicat now works as before. If you have ESET or other security tools, the dll file might be locked for few minutes, for security checkup. Be patient, and try after ~5 min again…

    Enjoy!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search