Mercurial > gemma
comparison 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 |
comparison
equal
deleted
inserted
replaced
597:3704ce844530 | 598:4854a1e85870 |
---|---|
20 type IntServices struct { | 20 type IntServices struct { |
21 entries []IntEntry | 21 entries []IntEntry |
22 mu sync.Mutex | 22 mu sync.Mutex |
23 } | 23 } |
24 | 24 |
25 const selectPublishedServices = `SELECT name, style, as_wms, as_wfs | 25 const selectPublishedServices = `SELECT relname, style, as_wms, as_wfs |
26 FROM sys_admin.published_services ORDER by name` | 26 FROM sys_admin.published_services JOIN pg_class ON name = oid ORDER by relname` |
27 | 27 |
28 var InternalServices = &IntServices{} | 28 var InternalServices = &IntServices{} |
29 | 29 |
30 func (ps *IntServices) Find(name string) (string, bool) { | 30 func (ps *IntServices) Find(name string) (string, bool) { |
31 ps.mu.Lock() | 31 ps.mu.Lock() |