Re: How to iterate through arrays?

Поиск
Список
Период
Сортировка
От PFC
Тема Re: How to iterate through arrays?
Дата
Msg-id opslxolvodth1vuj@musicbox
обсуждение исходный текст
Ответ на How to iterate through arrays?  (NosyMan <nosyman@gmail.com>)
Ответы Re: How to iterate through arrays?  (NosyMan <nosyman@gmail.com>)
Список pgsql-sql
- use TEXT instead of CHAR (what is CHAR without (n) ?)
- inintialize your array with '{}' because it is created as NULL if you  
just declare it without setting it to an empty array.

> Hi there,
>
> I'm trying to iterate through arrays in PL/PGSQL:
> ....
>     DECLARE
>         update_query CHAR;
>         update_query_params CHAR ARRAY[6];
>     BEGIN
>             update_query_params[1]:='some text';        
>             
>             RAISE NOTICE 'Testing element %', update_query_params[1];
>     END
> .....
>
>
> It does not 'compile'... :-(. Can you tell me what is the problem?
>
> Thanks,
> Nosy
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>




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

Предыдущее
От: NosyMan
Дата:
Сообщение: How to iterate through arrays?
Следующее
От: NosyMan
Дата:
Сообщение: Re: How to iterate through arrays?