Skip to content

Postgres Module error when updating other columns in row with array column #13647

Closed
@leesilverman

Description

@leesilverman

Bug Description

Postgres Module in Update mode. Table has a column of type jsonb[] that is set to not null. Module throws error 'Column 'XXX' has to be an array' when updating other columns, even if that column has been deleted from Values to update. Correct behavior is that the module should not check the type of data supplied for that field because we're not updating that field.

To Reproduce

  1. Create a table with three columns: id (int, not null, primary key, identity always), userdata (array of jsonb), updated (timestamptz, not null)
  2. In automation, create Postgres module with Insert operation to add a row with an array of JSON objects as the userdata and {{ $now }} as the value for updated
  3. Connect a Postgres module with Update operation that matches on id. Use {{ $json.recno }} from the previous module as the value to match on. Use {{ $now }} for updated. Click the trash icon next to column userdata.

The update module should throw an error saying that userdata needs to be an array.

Expected behavior

Should not error because we're not updating the userdata column.

Operating System

Amazon Linux 2023

n8n Version

1.80.5

Node.js Version

22

Database

PostgreSQL

Execution mode

main (default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    In ReviewWe are reviewing the issueNeeds FeedbackWaiting for further input or clarification.in linearIssue or PR has been created in Linear for internal review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions