0

When I add a layer in GeoServer that is a foreign table in my database, I get an error of:

Failed to load attribute list, internal error is: Schema 'table' does not exist .

When I add that same layer as a regular table or a materialized view, GeoServer is able to read from the table properly.

Does anyone know why that is?

1
  • You need to turn up the logging level to developer in the global settings page, and then make the request again. Then edit your question with the relevant part of the log file.
    – Ian Turton
    Commented Mar 7, 2022 at 8:24

1 Answer 1

1

You can avoid the issue by creating a regular view.

CREATE VIEW my_view AS SELECT * FROM my_foreign_table

Maybe you will need to explicit geometry type and crs in the view definition ( ex : geom::geometry(Point,4326) )

1
  • I'm trying to avoid creating a view, as I have 50+ foreign tables. Does Geoserver support reading foreign tables? I couldn't find any documentation regarding foreign tables? Is creating a view the only way around this problem? Commented Mar 9, 2022 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.