I have used oracle_fdw to create a foreign data wrapper in my PostgreSQL database to connect to my Oracle database and retrieve foreign tables from the Oracle database into my Postgres database. This includes the geometry of the Oracle table.
When I save the foreign table as a "local" table and add a primary key and spatial index, I can add the local table to the map in QGIS, so I know that the geometry has been retrieved correctly.
However, when I try to put the foreign table directly into QGIS, I get "invalid layer and cannot be loaded". I'm sure that this is because I can't add a spatial index or primary key to the foreign table.
Is there any way to show this foreign table in QGIS without the spatial index and primary key?