Cursor loop - stop current iteration and continue with next iteration - Mailing list pgsql-general

From Dinesh Kumara
Subject Cursor loop - stop current iteration and continue with next iteration
Date
Msg-id 4EF17059.9020807@rezgateway.com
Whole thread Raw
Responses Re: Cursor loop - stop current iteration and continue with next iteration
List 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

Attachment

pgsql-general by date:

Previous
From: Yan Chunlu
Date:
Subject: Re: ignore duplicate key while using COPY?
Next
From: Jacques Lamothe
Date:
Subject: Help with Multiple Cluster on same host