Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
leesilverman opened this issue Mar 3, 2025 · 1 comment
Labels
in linear Issue or PR has been created in Linear for internal review In Review We are reviewing the issue

Comments

@leesilverman
Copy link

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)

@Joffcom
Copy link
Member

Joffcom commented Mar 3, 2025

Hey @leesilverman,

We have created an internal ticket to look into this which we will be tracking as "GHC-1034"

@Joffcom Joffcom added in linear Issue or PR has been created in Linear for internal review In Review We are reviewing the issue labels Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review In Review We are reviewing the issue
Projects
None yet
Development

No branches or pull requests

2 participants