I am getting an error in a new postgres node when using "insert or update" operation

In test mode, I run the same query and get different results (screencast 1).

In manual mode, I get the result, but with incomprehensible execution work (large delay, perhaps this is a completely different problem) (screencast 2).

I haven’t tested with the Supabase node yet.

screencast 1
2023-05-13_00-08-51 (2)

screencast 2
2023-05-13_00-12-28 (2)

What about with the execute query operation?

Do you mean make the same task a SQL query?

Yeah so in the node rather than using the insert / update select Execute Query and manually input the query and see if that works. It could also be worth copying the node out and putting it into a text editor and changing the typeVersion value to 1 then copy / paste back into n8n and see if that works.

Hey @Jon,
I ran all the tests, the results are in the screenshot.

Hey @Roket,

We already know about the v2 node so no need to test the upsert again :slightly_smiling_face:

The execute query operation will be the best solution for now.

1 Like

Hey @Roket,

We have just put in a fix that should solve this here: fix(Postgres Node): Remove reusable connections (no-changelog) by michael-radency · Pull Request #6259 · n8n-io/n8n · GitHub it should be available either this week or next week depending on how long the review takes.

1 Like

Hey @Jon,
Thanks a lot!

1 Like

New version [email protected] got released which includes the GitHub PR 6259.

1 Like

I am receiving a bunch of webhooks and upserting them into a table in Supabase, but it seems that all update operations are failing with the same error. I am in the latest beta version of N8n 0.230.1 .

I am going to try to do it with the query, but it can be painful with so many values to be sent.

@jpm , hey!

I implemented the preprocessing of objects arriving at the postgres node using JS.

You can customize this process template to your liking.

1 Like

Thanks @Rocket! Will try it out.