<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr" data-setdir="false">Hi Dirk,</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I have looked into this and found no easy solution. As you have noticed there is no "Provider Feature Filter" in the Source tab of the layer properties for a raster layer. The next obvious path would be to write a SELECT statement in an SQL Window in the Database Manager and "Load as New Layer", but this is only set up for geometry columns, not raster. Next is to create a view or a materialized view with the associated indexes in the database and try adding that to QGIS using the four methods for adding layers. All of these result in the same PostGIS errors, that a primary key can not be found for the raster table, that the raster layer is invalid and that the "<span>Data type size for band 1 could not be found: num bands is: 0 and the type size map for bands contains: 0 item(s)"</span>.  <br></div><div><br></div><div dir="ltr" data-setdir="false">I have searched the <span>QGIS issues page on </span>Github and not found anything beyond the basic functionality of adding PostGIS rasters. I believe that if you are interested in this functionality you should file a feature request on the qgis/QGIS issues page on Github.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">This is what I found, note that all of the issues are closed: <br></div><div dir="ltr" data-setdir="false"><a href="https://github.com/qgis/QGIS/issues?q=is%3Aissue+postgresraster+" rel="nofollow" target="_blank">https://github.com/qgis/QGIS/issues?q=is%3Aissue+postgresraster+</a></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">-Thayer</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr"><br></div><div dir="ltr" data-setdir="false"> <div>> Date: Wed, 2 Nov 2022 12:08:08 +0000<br>> From: <Dirk.Pispers@STADT-KOELN.DE><br>> To: <qgis-user@lists.osgeo.org><br>> Subject: [Qgis-user] PostGIS raster layer filtered by attribute<br>> Message-ID: <8766215b88b84d3ba770e6c0a7979d93@STADT-KOELN.DE><br>>Content-Type: text/plain; charset="us-ascii"<br>> <br>>Hi list,<br>> <br>> I import TIFF-files into a PostgreSQL/PostGIS table with FME. In addition to the raster column my table has some more columns.<br>> Is it possible to filter the raster layer based on my table by these additional columns?<br>> It seems that QGIS (up to 3.28) doesn't handle addional columns in raster layers, but maybe someone knows a trick to do so.<br>> Thanks and regards<br>><br>> Dirk</div><br></div><div id="ydp3b747a20yahoo_quoted_8375157736" class="ydp3b747a20yahoo_quoted"><div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
            </div>
        </div></div></body></html>