Re: Re: Support plpgsql multi-range in conditional control
От | 2903807914@qq.com |
---|---|
Тема | Re: Re: Support plpgsql multi-range in conditional control |
Дата | |
Msg-id | tencent_8C956CC3BC221A9C12B6C1F0A07165889308@qq.com обсуждение исходный текст |
Ответ на | Support plpgsql multi-range in conditional control ("2903807914@qq.com" <2903807914@qq.com>) |
Ответы |
Re: Re: Support plpgsql multi-range in conditional control
|
Список | pgsql-hackers |
Hello, thank you very much for your reply. But I think you may have misunderstood what we have done.
What we do this time is that we can use multiple range ranges (condition_iterator) after in. Previously, we can only use such an interval [lower, upper] after in, but in some scenarios, we may need a list: condition_ iterator[,condition_iterator ...]
condition_iterator:
[ REVERSE ] expression .. expression [ BY expression ]
Thanks again!
songjinzhou (2903807914@qq.com)
From: Pavel StehuleDate: 2023-01-19 21:04CC: pgsql-hackers; 1276576182Subject: Re: Support plpgsql multi-range in conditional controlHiDear hackers, my good friend Hou Jiaxing and I have implemented a version of the code that supports multiple integer range conditions in the in condition control of the for loop statement in the plpgsql procedural language. A typical example is as follows:postgres=# do $$declarei int := 10;beginfor i in 1..10 by 3, reverse i+10..i+1 by 3 loopraise info '%', i;end loop;end $$;INFO: 1INFO: 4INFO: 7INFO: 10INFO: 20INFO: 17INFO: 14INFO: 11dopostgres=#Hope to get your feedback, thank you!I don't like it. The original design of ADA language is to be a safe and simple language. Proposed design is in 100% inversion.What use case it should to support?RegardsPavel
В списке pgsql-hackers по дате отправления: