I have created a model in QGIS that uses data to create a set of tables in PostgreSQL via the "Export to PostgreSQL" process

Is there a processing command that will allow me to access these tables as part of my model?

At the moment I have to stop and add them manually from the browser

This is latest version of QGIS 3.8. The tables do not have a geometry column

  • 1
    If the tables don't have a geometry column, they're not PostGIS tables, just tables.
    – Vince
    Commented Aug 29, 2019 at 13:32

1 Answer 1


Turns out to be quite simple. You use the "PostgreSQL execute and Load" process step. And the output from this SQL will be available as inputs to other steps.

Also worth knowing that this does not work unless your query outputs a geometry (despite it being marked optional). I faked it with:-

SELECT distinct code,
       ST_GEOMFROMEWKT('SRID=4326;POINT(0 0)') as geom,

And then set Unique ID field to "code" and Geometry Field to "geom"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.