I have a large Postgres/PostGIS database table with ~100 million points that I need to have available for editing (mainly, removing points). Currently, I'm trying to use a QueryLayer in QGIS using this query:
SELECT x.id, x.geom, m.data_tag FROM xyz_master as x INNER JOIN raw_tile_metadata as m on x.fid = m.id WHERE x.fid in ( select n.id from raw_tile_metadata as n where n.tile_path like '%50E40N_%' )
xyz_master is my point data table and
m.data_tag refers to a data attribute necessary for editing, which comes from a metadata table (hence, the join). The
where clause is just selecting a confined area so we're not editing the entire data set at a given time.
When loaded into QGIS as a query layer, feature editing is disabled (the "toggle editing" button is disabled). I double checked user permissions and write permissions are granted. I even connected as the database superuser and still could not edit.
How can I enable editing on a QGIS query layer?