Postgresql – “ERROR: column rel.relhasoids does not exist” with PostgreSQL 12 and PgAdmin 4.3

pgadminpostgresql

I get the following error when trying to select rows from a table:

ERROR:  column rel.relhasoids does not exist
LINE 1: SELECT rel.relhasoids AS has_oids

Configuration is:

  • Linux RHL8
  • NAME="Red Hat Enterprise Linux"
  • VERSION="8.2 (Ootpa)"
  • postgresql12-server-12.3
  • psql (12.3)
  • PgAdmin 4.3 en 4,5

Best Answer

The column relhasoids has been dropped from the system catalog pg_class in PostgreSQL v12, because the long deprecated WITH OIDS clause has been removed from CREATE TABLE.

Obviously you are using an old version of pgAdmin 4 that has not got the message yet.

Upgrade to a newer version of pgAdmin, and the error should vanish.