Postgres psql requires " FROM database.table" in sql statement
....FROM database.table


That is not a database, that is a schema.  (With the weird and confusing name of &quot;database&quot;).
You can refer to things with 3 name components, databasename.schemaname.tablename, but this is rarely done as then the first component must be the same as the name of the database you are connected to.  Which makes it pretty useless, other than as a way to maintain compatibility with other database software.
In one database, your tables are in a schema which is in the search_path, and in the other database they are not.  Maybe that is because the search_path differs between databases, or maybe because the tables are actually in differently named schemas.  You can use show search_path to see what search_path is in effect in each database.