Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostgreSQL - getting an error when listing databases with message "ERROR: column d.daticu does not exist"

what could be causing the error below when listing databases in PostgreSQL.

I have 2 clusters running on the same machine under different ports and different data directories. The command works fine when I connect to one of them but fails when I connect to the other.

One cluster is using the PostgreSQL database community version while the other is using the EnterpriseDB Advanced Server 12.1.2 postgres platform but seated on the same machine though different directories.

My psql client version is psql (EnterpriseDB) 12.1.2 and the database version is PostgreSQL 12.1, compiled by Visual C++ build 1914, 64-bit

Error being experienced is:

postgres=# \l
ERROR:  column d.daticu does not exist
LINE 6:        d.daticu as "ICU",
               ^
HINT:  Perhaps you meant to reference the column "d.datacl".

enter image description here

like image 914
Kalema Edgar Avatar asked Jun 10 '26 22:06

Kalema Edgar


1 Answers

Your server is open source PostgreSQL, while psql is EnterpriseDB's fork.

EnterpriseDB must have hacked up their pg_database to include an additional column, and the query run for \l references that column. Now open source PostgreSQL doesn't have that column, so the query fails.

Use psql from the same distribution as the server for best results.

like image 69
Laurenz Albe Avatar answered Jun 12 '26 12:06

Laurenz Albe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!