Add error code to user-visible message.

Reported-by: Alexander Lakhin <exclusion@gmail.com>
This commit is contained in:
Jeff Davis 2026-03-13 16:07:54 -07:00
parent b1f14c9672
commit 9b860373da

View file

@ -250,7 +250,8 @@ ForeignServerConnectionString(Oid userid, Oid serverid)
if (!OidIsValid(fdw->fdwconnection))
ereport(ERROR,
(errmsg("foreign data wrapper \"%s\" does not support subscription connections",
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("foreign data wrapper \"%s\" does not support subscription connections",
fdw->fdwname),
errdetail("Foreign data wrapper must be defined with CONNECTION specified.")));