RE: BUG #17514: Application with embedded SQL crashes when executing EXEC SQL PREPARE

From: "okano(dot)naoki(at)fujitsu(dot)com" <okano(dot)naoki(at)fujitsu(dot)com>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: BUG #17514: Application with embedded SQL crashes when executing EXEC SQL PREPARE
Date: 2022-06-10 05:09:19
Message-ID: TYCPR01MB6575C8E69634E57624378904FFA69@TYCPR01MB6575.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:
> We could do something like the attached, perhaps. Having said that,
> an application that includes no error checks is pretty unlikely to
> fail gracefully :-(.

Thank you for replying and creating the patch!

I applied this patch to the master branch, and confirmed that the
application resulted in an error instead of a crash.
As with PREPARE, executing DISCONNECT CURRENT also caused the
application to crash, but this patch has fixed that.
The patch looks good to me.
I agree that applications should consider EXEC SQL PREPARE
returning errors.

Regards,
Naoki Okano

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-06-10 06:25:44 Re: Using PQexecQuery in pipeline mode produces unexpected Close messages
Previous Message PG Bug reporting form 2022-06-09 20:42:22 BUG #17515: Change in behaviour of a composite type within a domain