Pro. Regarding Arrays.
От | Pankaj Soni |
---|---|
Тема | Pro. Regarding Arrays. |
Дата | |
Msg-id | F22YILoygXLsxpTljBO0000061b@hotmail.com обсуждение исходный текст |
Список | pgsql-general |
Hello All, I am Working on pgsqls user defined arrays. if i am using arrays as l-value then '[]' doesnt give any error but if i am trying to assign some value to any element of the array then it gives error. the function i am using as follows... CREATE TYPE int_array_t ( INPUT = array_in, OUTPUT = array_out, INTERNALLENGTH = VARIABLE, ELEMENT = int4 ); create function test_int_array() returns int4 as 'declare array_input int_array_t; count int4; begin -- Initialize count := 0; array_input := ''{1, 2, 3}''; while array_input[count + 1] IS NOT NULL loop count := count + 1; count := array_input[count]; end loop; return count; end;' /* if i use array_input[Count]:=Count; then it gives compilation error NOTICE: plpgsql: ERROR during compile of test_int_array near line 15 ERROR: parse error at or near "[" */ Please guide me Thanks Pankaj language 'plpgsql'; _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.
В списке pgsql-general по дате отправления: