2d array issues
От
John Gant
Тема
2d array issues
Дата
Msg-id
f9f875540702282153j65965dcdxa37a6d6c15a9a35d@mail.gmail.com
Список
Hello,
Can anyone tell me why the function below is breaking at the second assignment? I am trying to set values for columns 1 and 2 for row 1. The compilation and error are below the function definition. Thanks in advance.
Can anyone tell me why the function below is breaking at the second assignment? I am trying to set values for columns 1 and 2 for row 1. The compilation and error are below the function definition. Thanks in advance.
CREATE OR REPLACE FUNCTION test() returns void AS $$ declare matrix numeric [] []; cnt numeric := 1; begin matrix[cnt] [1] := 3; raise notice '%', matrix[cnt ][1]; matrix[cnt] [2] := 4; raise notice '%', matrix[cnt ][2]; end; $$ LANGUAGE plpgsql; error... stocks=# \i test.sql CREATE FUNCTION stocks=# select test(); NOTICE: 3 ERROR: invalid array subscripts CONTEXT: PL/pgSQL FUNCTION "test" line 7 at assignment
В списке pgsql-general по дате отправления