06-04-2020 02:49 AM - edited 06-04-2020 02:50 AM
I would like to add new features from a PostgreSQL database to an existing Smart Client project using the "Import Feature From Database" dialogue. But the feature list is empty, see attachement. Since there is no error message, I assume that the connection is accepted by the PostgreSQL Server.
I am using GMSC 126.96.36.199 and PostgreSQL 9.5.x.
Important: If I use the same connection parameters with Geomedia Professional, the feature list is populated.
Thank you very much and kind regards.
Solved! Go to Solution.
06-04-2020 09:55 AM
You can use the browser console (F12 most browsers) to check on the 'LoadFromDatabase' request and response.
This will give you some aditional information on the connection and returned results.
You will find the GMSC Administrator log file on the GMSC server at '~:\installdir\Program\Administrator\Log'.
Check it out for more information. You can change the level of logging there in the Web.config file of 'Administrator'
I myself use PostgreSQL Server 9.5.x connection against GMSC 16.6 and I dont see any issues with display of feature to import.
You may check that your connecting user has the DBO permission against those features, but outside of that there is not additional settings needed on this database loader type.
I hope that helps
06-09-2020 12:43 AM
Thank you, Sclow, for your reply.
I used the browser console and it seems, that in our case the 'LoadFromDatabase' response is empty...
Meanwhile, it figured out, that the PostgreSQL database is allready on version 9.6.18. Could that cause the problem?
The PostGIS-Versions are:
postgis24_96.x86_64 2.4.8-10.rhel7 @imx_product_3rd_party_postgresql_repository_postgresql96_rhel7_x86_64
postgis24_96-client.x86_64 2.4.8-10.rhel7 @imx_product_3rd_party_postgresql_repository_postgresql96_rhel7_x86_64
pgrouting_96.x86_64 2.6.2-1.rhel7 @imx_product_3rd_party_postgresql_repository_postgresql96_rhel7_x86_64
06-09-2020 05:33 AM
Yes, the response is empty. This makes sense and we confirm this when there is no features listed to Import. Can you confirm that the 'LoadFromDatabase' connects ie. its not in error?
If yes, then you should explore the connecting user permissions. Does that user have DBO rights on the features in that database?
PostgreSQL 9.6 shouldn't be a problem. Minimum required with GMSC 16.6 is 9.3 and I can work just as well with 9.5 even.
06-10-2020 12:27 AM
I have new information: The PostGreSQL is using different schemas. Is there a way to specify a specific schema in GMSC?
06-10-2020 03:37 AM
There was a bug in past versions of GMSC that did not allow for features outside of the 'public' schema to be imported.
That bug was fixed prior to your version of GMSC 16.6.
Schemas other than 'public' should be indicated by their 'schemaname.featurename' in the import features list.
Here is example of GMSC 16.6 showing features from both 'public' and 'names' schema available for import.
06-10-2020 04:01 AM
I would also recommend using PGAdmin to monitor the PostgreSQL database and in that way you can track the SQL statement against the database and from that gleen information related to your results in the GMSC Administrator.
I hope that helps
06-15-2020 07:16 AM - edited 06-15-2020 07:48 AM
I checked with the PG Admin Tool. We send the following SQL statement:
Select geometrie, geometrie_GDO From stzh.zwn_meldungen_p Where geometrie Is Not Null Limit 1
This results in an error since the column "geometrie_GDO" does not exist:
ERROR: column "geometrie_gdo" does not exist LINE 1: Select geometrie, geometrie_GDO From stzh.zwn_meldungen_p Wh...
Is there some additional configurations that we have to to, either in GMSC or in the database?
Thank you and regards.
11-03-2020 02:34 AM
You need to have 2 geometry columns for the feature to work in PostgreSQL:
"envelope" "public"."geometry" NOT NULL,
"envelope_gdo" bytea NOT NULL
Hope it helps,
11-03-2020 10:53 PM
Thanks for your reply, this ws the solution that worked for me.
In the meantime I have created a support ticket, so that this solution is included in the official documentation.