Hi We have a PostgreSQL 11.15 instance with postgis 2.5 and Geoserver 2.21.1.
If I connect to a postgis database on the above PosrtgreSQL server as a data source in Geoserver and publish a layer (a table with oidcs and a geometry type) from it via the graphical interface I can thereafter rename a column (change the schema) of the table in the database and then in the published layer properties in Geoserver hit "reload feature type" and the column name change happens and the updated layer definition can be saved. If I pickup the feature type definition of that layer via its representation at /geoserver/rest/workspaces/workspace/datastores/datastore/featuretypes/newly_pub_layer.json, remove it from geoserver (via the graphical interface) and then proceed to post it as per https://docs.geoserver.org/latest/en/api/#1.0.0/featuretypes.yaml to create it anew I get 201 created back, the layer looks the same as if I had published it via the interface as the first time around, it can be previewed and appears fully functional. If I proceed to change the table schema again and hit "reload feature type" the column name change is not reflected in the gui and when I try to save the layer the error from Geoserver i:s *"The CQL source expression for attribute namn refers to attributes unavailable in the data source: [old column name]*" The same error happens if I open the data source properties in Geoserver and hit save. If I open the data source properties and hit save before I change the table schema and after I've created the layer via the rest api there is no error, but the error appears all the same after the schema of the table is changed. Is this a known weakness of employing the rest api in order to create layers based on database sources, or is this expected to work and likely an issue in our environment? Friendly regards, David
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users