<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Burghardt,</p>
<p>Thanks for the hint. I will keep an eye on dump and restore regarding the XMLParser. That sounds like an annoying workaround. Hopefully there can be a better solution rather than having to edit dump files before restores.</p>
<p>This is a completely new, self-compiled PostgresQL/Postgis server with all the newest libraries and versions. Obviously, when compiling, I missed the XML bit - because personally I did not need XML support so far.</p>
<p>Looking forward to get this working,</p>
<p>Andreas</p>
<p>On 2016-07-29 07:52, Burghardt.Scholle@stadt.wolfsburg.de wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored --><!-- meta ignored -->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;">Hi Andreas,<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;">To save the layer styles in a PG table is a cool feature </span><span style="font-size: 11.0pt; font-family: Wingdings; color: #1f497d;">J</span><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;">. I have no problems to save the table with a connection based on host/database.<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;">A hint from me: QGIS stores the style-information with the data type "xml". For me this made problems when exporting / importing this data. By default, the XMLPARSER from postgresql works with the "CONTENT" option. When importing a dump file from the "layer styles"-table you get an error message: "ERROR: invalid XML content". To prevent this, you need to edit the dump file. Before the insert / copy command to insert the layer styles records you must add the statement "SET xmloption TO DOCUMENT;".<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;">Regards<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;">Burghardt<!-- o ignored --></span></p>
<p class="MsoNormal"><span><!-- o ignored --> </span></p>
<div style="border: none; border-left: solid blue 1.5pt; padding: 0cm 0cm 0cm 4.0pt;">
<div>
<div style="border: none; border-top: solid #B5C4DF 1.0pt; padding: 3.0pt 0cm 0cm 0cm;">
<p class="MsoNormal"><strong><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">Von:</span></strong><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';"> Qgis-user [mailto:qgis-user-bounces@lists.osgeo.org] <strong>Im Auftrag von </strong>Andreas Neumann<br /><strong>Gesendet:</strong> Donnerstag, 28. Juli 2016 18:14<br /><strong>An:</strong> DelazJ<br /><strong>Cc:</strong> QGIS User List<br /><strong>Betreff:</strong> Re: [Qgis-user] Saving/Loading styles in Postgis<!-- o ignored --></span></p>
</div>
</div>
<p class="MsoNormal"><!-- o ignored --> </p>
<p class="MsoNormal" style="margin-bottom: 12.0pt;">Strange. I can see the empty layer_styles table in my public schema. But saving fails. Maybe it fails because my PG connection is based on a service definition and not on host/database?<!-- o ignored --></p>
<div>
<p class="MsoNormal"><span>On July 28, 2016 6:08:01 PM CEST, DelazJ <</span><a href="mailto:delazj@gmail.com"><span>delazj@gmail.com</span></a><span>> wrote:<!-- o ignored --></span></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom: 12.0pt;">Hi,<br /> Andreas,  Styles are indeed saved in the public schema, in a table named "layer_styles". I had never created such a table so I assume it's created by QGIS.<!-- o ignored --></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom: 12.0pt;">Just made a test and rename my current "layer_styles" table. Then I successfully save a new layer style in PG from QGIS 2.16: a new table "layer_styles" has automatically been created in the public schema.<!-- o ignored --></p>
</div>
<div>
<p class="MsoNormal">HTH,<!-- o ignored --></p>
</div>
<div>
<p class="MsoNormal">Harrissou<!-- o ignored --></p>
</div>
<div>
<p class="MsoNormal"><!-- o ignored --> </p>
<div>
<p class="MsoNormal">2016-07-28 17:38 GMT+02:00 Neumann, Andreas <<a href="mailto:a.neumann@carto.net">a.neumann@carto.net</a>>:<!-- o ignored --></p>
<div>
<p><span style="font-size: 10.0pt; font-family: 'Verdana','sans-serif';">Hi,<!-- o ignored --></span></p>
<p><span style="font-size: 10.0pt; font-family: 'Verdana','sans-serif';">I have never used the Saving/Loading of styles in Postgis (see <a href="http://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/vector_properties.html#storing-style-in-a-file-or-a-database">http://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/vector_properties.html#storing-style-in-a-file-or-a-database</a>)<!-- o ignored --></span></p>
<p><span style="font-size: 10.0pt; font-family: 'Verdana','sans-serif';">Do I have to create a special styling table for it to enable this?<!-- o ignored --></span></p>
<p><span style="font-size: 10.0pt; font-family: 'Verdana','sans-serif';">Because when I try to save it (QGIS 2.16) I get an error message along the lines that my user may not have permissions to save the style. However, I am trying to save the style with a user that has full administrator rights in Postgis.<!-- o ignored --></span></p>
<p><span style="font-size: 10.0pt; font-family: 'Verdana','sans-serif';">In what schema and table are the styles stored? I assume in the public schema. Will QGIS automatically create a styling table or do I have to create one myself?<!-- o ignored --></span></p>
<p><span style="font-size: 10.0pt; font-family: 'Verdana','sans-serif';">Thank you for any hints!<!-- o ignored --></span></p>
<p><span style="font-size: 10.0pt; font-family: 'Verdana','sans-serif'; color: #888888;">Andreas</span><span style="font-size: 10.0pt; font-family: 'Verdana','sans-serif';"><!-- o ignored --></span></p>
<p><span style="font-size: 10.0pt; font-family: 'Verdana','sans-serif';"> <!-- o ignored --></span></p>
<div>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: 'Verdana','sans-serif';"> <!-- o ignored --></span></p>
</div>
</div>
<p class="MsoNormal"><br /> _______________________________________________<br /> Qgis-user mailing list<br /><a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br /> List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user"> http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br /> Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user"> http://lists.osgeo.org/mailman/listinfo/qgis-user</a><!-- o ignored --></p>
</div>
<p class="MsoNormal"><!-- o ignored --> </p>
</div>
</div>
</div>
<p class="MsoNormal"><br /> -- <br /> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.<!-- o ignored --></p>
</div>
</div>
</blockquote>
<p> </p>
<div> </div>
</body></html>