Another possible problem is that the version of the postgres database server and psql does not match. I got this error when trying to connect to postgres 18 using psql version 16.
Probably that column was removed from their so psql was querying using an additional column.