diff pkg/models/intservices.go @ 598:4854a1e85870

Ensure published service is based on existing table Using the OID of the table (via the regclass type) establishes a reference to the system catalogs, which will also allow to distinguish between tables in different schemas if such tables have to be published via different datastores in GeoServer.
author Tom Gottfried <tom@intevation.de>
date Fri, 07 Sep 2018 17:27:01 +0200
parents c10c76c92797
children ac325d191009
line wrap: on
line diff
--- a/pkg/models/intservices.go	Fri Sep 07 14:44:38 2018 +0200
+++ b/pkg/models/intservices.go	Fri Sep 07 17:27:01 2018 +0200
@@ -22,8 +22,8 @@
 	mu      sync.Mutex
 }
 
-const selectPublishedServices = `SELECT name, style, as_wms, as_wfs
-FROM sys_admin.published_services ORDER by name`
+const selectPublishedServices = `SELECT relname, style, as_wms, as_wfs
+FROM sys_admin.published_services JOIN pg_class ON name = oid ORDER by relname`
 
 var InternalServices = &IntServices{}