Re: working with multidimensional arrays in plpgsql

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: working with multidimensional arrays in plpgsql
Дата
Msg-id 41F76311.5030608@archonet.com
обсуждение исходный текст
Ответ на working with multidimensional arrays in plpgsql  (Sibtay Abbas <sibtay@gmail.com>)
Ответы Re: working with multidimensional arrays in plpgsql  (Sibtay Abbas <sibtay@gmail.com>)
Список pgsql-sql
Sibtay Abbas wrote:
> hello everyone
> 
> i am having problem with multidimensional arrays in plpgsql following
> is the source code of the function which i am trying to run


> DECLARE
>   x INTEGER[10][10];

> x[3][1] := '20';               ------i have even tried x[3][1] = 20

> As you might have observed here, the actual problem is
> how to do assignment to multidimensional array locations using the
> subscript operater.

Actually, the problem is that the array "x" has been initialised to 
NULL. Therefore, you can't set individual values. Try a line like:  x := '{}';

--  Richard Huxton  Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: Martin Schäfer
Дата:
Сообщение: Re: How to find out programmatically whether a query on a view will use an index?
Следующее
От: "Andrei Bintintan"
Дата:
Сообщение: Re: [PERFORM] OFFSET impact on Performance???