ECPG: WHENEVER statement with DO CONTINUE action

From: vinayak <Pokale_Vinayak_q3(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: meskes(at)postgresql(dot)org
Subject: ECPG: WHENEVER statement with DO CONTINUE action
Date: 2017-06-09 08:01:36
Message-ID: 148022ca-3318-bbf2-d44e-37aac58658b6@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

To develop the ECPG application more efficiently and improve portability,
I would like to suggest one minor improvement "WHENEVER condition *DO
CONTINUE*" support in ECPG.
Oracle Pro*C supports WHENEVER statement with DO CONTINUE action.[1]

EXEC SQL WHENEVER SQLERROR CONTINUE;
is not same as
EXEC SQL WHENEVER SQLERROR DO CONTINUE;

The CONTINUE action instructs the client application to proceed to the
next statement whereas DO CONTINUE action instructs the client
application to emit a C continue statement and the flow of control
return to the beginning of the enclosing loop.

I have tried to implement it. Please check the attached patch.

Please give me feedback.

[1]https://docs.oracle.com/cd/B28359_01/appdev.111/b28427/pc_09err.htm#i12340

Regards,

Vinayak Pokale
NTT Open Source Software Center

Attachment Content-Type Size
whenever-do-continue.patch binary/octet-stream 2.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2017-06-09 08:08:53 Re: Surjective functional indexes
Previous Message Antonin Houska 2017-06-09 07:25:34 Re: snapbuild woes