Skip to main content
1 of 3
Jochen Schwarze
  • 14.9k
  • 8
  • 54
  • 120

Well, you are of course NOT limited to one specific schema (Why should this be exactly dnk?) and QGIS loads default styles for tables in whatever schema (but first of all I strongly recommend to the latest QGIS Versions 2.18.22 LTR and/or 3.2 by Aug. 6th, 2018).

If e.g. in QGIS 3.2 under Layer|Properties|Style|Style|Save Style|Save in database (postgres)

enter image description here

you save the style with e.g. the following settings:

enter image description here

you create the following entry in your public.layer_styles table:

enter image description here

and this style definitely loads per default (at least in the two latest versions above that I have access to)

If you have created the public.layer_styles table manually, make sure that the tables schema is in the f_table_name, that you have no misspellings in the f_table_name column and that the useasdefault column is set to some boolean True (t, 1, ... should work also, cp. https://www.postgresql.org/docs/10/static/datatype-boolean.html for valid representations of boolean type in PostgreSQL) only for the style you want to load as default and False for any other.

Jochen Schwarze
  • 14.9k
  • 8
  • 54
  • 120