Skip to content
Advertisement

psycopg update with unnest for a bytea column

I’m trying to update a lot of row in my database using unnest(). Here’s my db:

JavaScript

Then I update the table with:

JavaScript

But I got the following error:

JavaScript

However, it’s working if I do a classic update. Any idea ?

JavaScript

Advertisement

Answer

Since your data is a 2×100 matrix, is better to partition it in vectors (1d array) for each parameter as follows:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement