There appears to be working connections to PostgreSQL databases in the QGIS modeler. I have added and configured them and they connect to what they are supposed to but the outputs from them don't appear to be available to subsequent functions! See attached. What am I missing?
Try the following model to take database infos (connexion, schema, table) to load table as a layer.
It will write then to an output table named
out2 in the same database (but will not add it as layer).
In this particular case, I've linked PostGIS table reading to Export PostGIS table but in your case, you can link the first Processing algorithm to others algorithms like usual.
The model is available at https://gist.github.com/ThomasG77/61afda568887fcc603e1f9ef963925ec but you need to load it ("Processing" > "Graphical Modeler...", then in new Window, menu "Model" > "Open Model...").
General Model Designer overview
The tip is mainly in below screenshot and use "PostgreSQL execute and load SQL"