ServerErrorMessage.toString()方法会默认包含客户端ip与数据库ip且无法通过任何方式屏蔽。
这导致程序在捕获PSQLException时无法直接使用其getMessage方法,需要格外小心其是否包含ServerErrorMessage,因为包含ServerErrorMessage的PSQLException.getMessage方法返回的字符串中也会包含客户端ip与数据库ip。
建议通过ServerErrorMessage构造的PSQLException的getMessage方法屏蔽掉ip相关的信息,程序确需ip相关信息的,可以自行通过PSQLException.getServerErrorMessage().toString()方法获取。
Hey @zyl, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss_bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Hi @zyl,
if you want to get quick review about your issue, please contact the owner in first: @周斌 ,
and then any of the maintainers: @Pike
and then any of the committers: @travelliu , @aaronwell , @Loong , @Kamus , @vimiix , @汪伟
if you have any question, please contact the SIG: Connectors.
登录 后才可以发表评论