Re: Proposal: plpgsql - "for in array" statement

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Proposal: plpgsql - "for in array" statement
Дата
Msg-id 4CA2665F.1040000@dunslane.net
обсуждение исходный текст
Ответ на Re: Proposal: plpgsql - "for in array" statement  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
<br /><br /><br /> On 09/28/2010 03:41 PM, Pavel Stehule wrote:<br /><br /><blockquote
cite="mid:AANLkTi=18UivzKezbi+Eax0xx3LeHGr_CfK24z6xrMp1@mail.gmail.com"type="cite"><br /><pre wrap="">
 
It's not simple - FOR i IN array is natural - Original ADA use a very
similar construct. 
</pre></blockquote><br /><br /> No it doesn't. In Ada (Note: not ADA) FOR can only iterate over one thing: a discrete
subtype(e.g. an integer or enumeration type, or a range of it)[1]. You can say:<br /><blockquote>for i in
my_array'rangeloop ...<br /></blockquote> but that iterates over the array's index, not over its values.And there is no
ambiguitywith other things you might loop over because there aren't any.<br /><br /> cheers<br /><br /> andrew<br /><br
/>[1]<a class="moz-txt-link-freetext"
href="http://www.adaic.org/standards/05rm/html/RM-5-5.html">http://www.adaic.org/standards/05rm/html/RM-5-5.html</a><br
/>

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: UTF8 regexp and char classes still does not work
Следующее
От: Sergey Burladyan
Дата:
Сообщение: Re: UTF8 regexp and char classes still does not work