In the new Postgres node version (“type”: “n8n-nodes-base.postgres”, “typeVersion”: 2.2,) the Always Output Data configuration option is ignored. As it always output data.
Only the typeVersion 1 of the Postgres node works as expected.
Example in n8n-nodes-base.postgres typeVersion 2.2:
Example of executeQuery operation that has no results, with Always Output Data = false:
The output of the query is empty, but the node is still giving { “success”: true}. This is not the expected behavior having the “Always Output Data” disabled.
In prior Postgres node versions (“type”: “n8n-nodes-base.postgres”, “typeVersion”: 1) this works as expected.
Example of executeQuery operation that has no results, with Always Output Data = false:
The output is empty as expected, because the query has 0 results.
This behavior is creating issues on workflows based on the output of the postgres nodes. The current workaround is to use the “typeVersion”: 1 on the newer N8N versions.
Hi @pbdco, I am so sorry for the trouble. I was confused by this as well.
Can you try upgrading to n8n 1.5.1? This should come with the below fix:
The typeVersion of the updated Postgres node would be 2.3, you’d need to manually overwrite this after upgrading your n8n version (or add a new Postgres node from scratch).