<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Mike, <br>
    </p>
    <p>well, this is questionnable. One could just add columns during
      the session and save the table in another provider. <br>
    </p>
    <p>This should probably be only a soft warning and not something
      blocking those features. <br>
    </p>
    <p>Please feel free to open an issue with the tag "feature request".
      Implementation though will not appear by magic (sometimes it does
      though, we have some magic elves), feature are usually funded by
      users having this on their critical path. <br>
    </p>
    <p>Best regards</p>
    <p>Régis<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 04/03/2024 16:14, Elstermann, Mike
      via QGIS-Developer wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:408C4D84-BF60-46C0-B196-803AC8D4195F@itc-halle.de">
      <pre class="moz-quote-pre" wrap="">Hello everyone,
I have noticed the following: if I have read and write access (DML) to a PostgreSQL table, but no access to structure changes (DDL), then I can, for example, add new columns with the field calculator and fill them with results. Everything seems to run normally, I do not get a warning that I am not allowed to change the structure, the results generated in the field calculator are OK. After saving, all new columns including the data are gone. Can a corresponding preliminary check with warning be added here please?

If a new column is explicitly added, a message appears whose content does not match the situation.
"Could not add field 'Test' of type 'text'. Is the field name unique?“
A warning regarding missing authorizations for DB structure changes would be better.

As far as I know, there is no QGIS ticket or change request(<a class="moz-txt-link-freetext" href="https://github.com/qgis/QGIS/issues">https://github.com/qgis/QGIS/issues</a>) to improve the user guidance for these two cases.

There are currently two relevant sections in the error messages(<a class="moz-txt-link-freetext" href="https://github.com/qgis/QGIS/blob/master/i18n/qgis_de.ts">https://github.com/qgis/QGIS/blob/master/i18n/qgis_de.ts</a>). 

 <message>
        <location filename="../src/app/qgsattributetabledialog.cpp" line="969"/>
        <source>Failed to add field '%1' of type '%2'. Is the field name unique?</source>
        <translation>Could not add field '%1' of type '%2'. Is the field name unique?</translation>
    </message>
    <message>
        <location filename="../src/gui/vector/qgssourcefieldsproperties.cpp" line="286"/>
        <source>Failed to add field '%1' of type '%2'. Is the field name unique?</source>
        <translation>Could not add field '%1' of type '%2'. Is the field name unique?</translation>
    </message>

Many thanks in advance.
Mike Elstermann


_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
    </blockquote>
    <div id="grammalecte_menu_main_button_shadow_host"
      style="width: 0px; height: 0px;"></div>
  </body>
</html>