Postgres Insert Node error

Describe the problem/error/question

I am trying to run the Postgres node with redshift credentials getting data from set node, it throws the following error

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
{
  "meta": {
    "instanceId": "dd61eea25f31bb1ed7bf02576f6c82478194e550a3e1a5aa94e07e76254254c9"
  },
  "nodes": [
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "name",
              "value": "Ryan"
            },
            {
              "name": "age",
              "value": "15"
            }
          ]
        },
        "options": {}
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        200,
        540
      ],
      "id": "a0e8d1bf-a106-4107-9851-7da3455edf4b"
    },
    {
      "parameters": {
        "table": "example",
        "columns": "name,age",
        "additionalFields": {}
      },
      "name": "Postgres",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 1,
      "position": [
        400,
        540
      ],
      "id": "37f59cd0-2dd0-4589-b23d-f9dcc3c403b8",
      "credentials": {
        "postgres": {
          "id": "3",
          "name": "Postgres account"
        }
      }
    }
  ],
  "connections": {
    "Set": {
      "main": [
        [
          {
            "node": "Postgres",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:1.9.0
  • Database (default: redshift):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Manish_Kumar, welcome to the community!

The node is built for PostgreSQL, but Redshift does not support all of the PostgreSQL functionality. Specifically, when using the “Insert” operation n8n will try to return the result of the operation by using the RETURNING clause documented here. This is, however, not supported by Redshift from looking at their own docs.

So I’d suggest you simply switch to the “Execute Query” operation here. This will let you write your own INSERT query so you can take Redshift-specific limitations into account here.