Postgres psql requires " FROM database.table" in sql statement As a beginning learner of of Postgres I have created two different installations of a database where one requires a select statement to use ...FROM database.table... and the other only requires ...FROM table.... This was discovered in a Symfony project that could point to either installation. The project fails when pointing to the installation requiring ...FROM database.table... How can the requirement to include the database name with a table name be removed, and where might that requirement have come from?
Background:
The project began with a MySQL database. Since I wanted to learn Postgres I followed some great material found online to convert a MySQL database to Postgres. The MySQL data was in Windows, Postgres was installed on an Ubuntu 18 VM. (The conversion created the Postgres version on the VM.) The VM's database was dumped with pg_dump, the resulting sql file copied to Windows and restored there. All of this in MySQL 8 &amp; Postgres 12.
When the Symfony project points to the VM's database, all is fine and dandy. Pointing to the Windows copy fails because it cannot find any given table.
On the VM I can use psql to query using ...FROM table.... In Windows with psql, even though SELECT current_database(); returns the name of the database, I must use ...FROM database.table... in a query.
....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.