I am new in PL/pgsql and I would like to create a new Function.
In my case I have this table:
Column 1: VARIABLE = 2 2 2 2 2 2 2 2 2 2 Column 2: VALUE = 20 20 20 20 180 180 180 180 180 180 Column3: STRETCH = 1 1 1 1 1 1 2 2 2 2
And I would like to do a function to create N arrays from field VALUE where the STRETCH is different, for example:
Array 1: 20,20,20,20,180,180, Array 2: 180,180,180,180,
How can I do it?
\d tblin psql would give you), your version of Postgres. And "different" from what?