Re: Support plpgsql multi-range in conditional control

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Support plpgsql multi-range in conditional control
Дата
Msg-id CAFj8pRBQVLWG5bg9=8BV+NsE3osgMemGT1pU5ffHBa6BP_H8fA@mail.gmail.com
обсуждение исходный текст
Ответ на Support plpgsql multi-range in conditional control  ("2903807914@qq.com" <2903807914@qq.com>)
Ответы Re: Support plpgsql multi-range in conditional control  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi


čt 19. 1. 2023 v 10:23 odesílatel 2903807914@qq.com <2903807914@qq.com> napsal:
Dear 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 $$
declare
    i int := 10;
begin
    for i in 1..10 by 3, reverse i+10..i+1 by 3 loop
       raise info '%', i;
    end loop;
end $$;
INFO: 1
INFO: 4
INFO: 7
INFO: 10
INFO: 20
INFO: 17
INFO: 14
INFO: 11
do
postgres=#

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?

Regards

Pavel
 

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Time delayed LR (WAS Re: logical replication restrictions)
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Time delayed LR (WAS Re: logical replication restrictions)