Cursor loop - stop current iteration and continue with next iteration

Поиск
Список
Период
Сортировка
От Dinesh Kumara
Тема Cursor loop - stop current iteration and continue with next iteration
Дата
Msg-id 4EF17059.9020807@rezgateway.com
обсуждение исходный текст
Ответы Re: Cursor loop - stop current iteration and continue with next iteration
Список pgsql-general
Greetings..

Please advice me how to stop current iteration of cursor loop and continue with next iteration .

...
contractlistquery = '....';
OPEN rec_contractlist FOR EXECUTE contractlistquery;
    LOOP
    FETCH rec_contractlist INTO  contract_from_date,contract_to_date,contract_inv_type,contract_regionid;
    IF NOT FOUND THEN
    EXIT;
    END IF;

    IF contract_count = 0 THEN
        contract_initial_region = contract_regionid;
    END IF;

        IF contract_initial_region <> contract_regionid THEN
           
[Need to stop current iteration and continue with next iteration.]
       ELSE
        ...
        More  logic s here...
        ...
        END IF;

    END LOOP;
CLOSE rec_contractlist;

...

Really appreciate if you can help me on this.
--

Thanks and Regards,
Dinesh Kumara,
Software Engineer,
Reservation Gateway Inc,
Email:dinesh@rezgateway.com
www.rezgateway.com

Вложения

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

Предыдущее
От: Yan Chunlu
Дата:
Сообщение: Re: ignore duplicate key while using COPY?
Следующее
От: Jacques Lamothe
Дата:
Сообщение: Help with Multiple Cluster on same host