Proposal: Include CHECK constraint expression in violation error DETAIL

Started by Koshino Taikiabout 1 month ago9 messageshackers
Jump to latest
#1Koshino Taiki
koshino@sraoss.co.jp

Hi,

When a CHECK constraint is violated, PostgreSQL reports the constraint name
and the failing row, but not the constraint expression:

ERROR: new row for relation "staff_sales" violates check constraint "staff_age_check"
DETAIL: Failing row contains (1, 15).

Users need to inspect the table with \d to find the violated condition.
Is there a reason why the expression is not included in the error detail?
(For example, having such information appear in logs could pose a
security risk.)

Including it in DETAIL would avoid this extra step:

DETAIL: Failing row contains (1, 15). Check constraint expression: (age >= 18).

I have attached a concept patch to illustrate the idea. Please note that
this is a work in progress.

For the implementation, I wrote the expression generation by referring to
pg_get_constraintdef_worker().

Regarding security, I have not yet added any permission checks. I plan to
investigate whether they are needed at all, and if so what form they should
take, using the existing handling of the failing-row detail and the
previous proposal that was already committed as references:
</messages/by-id/9f9dc7ae-14f0-4a25-5485-964d9bfc19bd@lab.ntt.co.jp>

If this proposal is considered worthwhile, I would like to continue
developing the patch myself.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

Attachments:

t254338_1
v1-0001-Report-CHECK-expression-in-constraint-violation-d.patchapplication/octet-stream; name=v1-0001-Report-CHECK-expression-in-constraint-violation-d.patchDownload+16-8
#2Yash Jadhav
yash.jadhav8008@gmail.com
In reply to: Koshino Taiki (#1)
Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

I went through the patch and have a few thoughts on the security question.

Is there a reason why the expression is not included in the error detail?
(For example, having such information appear in logs could pose a
security risk.)

For clients: any role can read CHECK expressions from, including for
tables it has no privileges on, so printing the expression doesn't
seem to expose anything new.

For the server log: an error entry already contains the table, column
and constraint names, so expression looks less sensitive compared to
them.

Anything I should improve on?

Regards,
Yash

#3Koshino Taiki
koshino@sraoss.co.jp
In reply to: Yash Jadhav (#2)
Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi Yash,

Thank you for reviewing the patch.

For clients: any role can read CHECK expressions from, including for
tables it has no privileges on, so printing the expression doesn't
seem to expose anything new.

For the server log: an error entry already contains the table, column
and constraint names, so expression looks less sensitive compared to
them.

Anything I should improve on?

I agree that no additional security control seems necessary.

When the user has sufficient privileges to display the failing row, the client receives:

ERROR: new row for relation "check_detail_test" violates check constraint "age_check"
DETAIL: Failing row contains (15). Check constraint expression: (age >= 18).

When the user does not have sufficient privileges to display the failing row,
ExecBuildSlotValueDescription() returns NULL. The existing
"val_desc ? ... : 0" check then omits the entire DETAIL message:

ERROR: new row for relation "check_detail_test" violates check constraint "age_check"

The same applies to the server log because the DETAIL field is constructed by
the same code. Therefore, the CHECK expression is not sent to the client or
written to the server log when the failing row detail is suppressed.

I am preparing regression test fixes and will send an updated patch when they are
ready.

Regards,
Koshino

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Yash Jadhav <yash.jadhav8008@gmail.com>
送信日時: 2026年10月30日 4:23
宛先: Koshino Taiki <koshino@sraoss.co.jp>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Yugo Nagata <nagata@sraoss.co.jp>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

I went through the patch and have a few thoughts on the security question.

Is there a reason why the expression is not included in the error detail?
(For example, having such information appear in logs could pose a
security risk.)

For clients: any role can read CHECK expressions from, including for
tables it has no privileges on, so printing the expression doesn't
seem to expose anything new.

For the server log: an error entry already contains the table, column
and constraint names, so expression looks less sensitive compared to
them.

Anything I should improve on?

Regards,
Yash

#4Koshino Taiki
koshino@sraoss.co.jp
In reply to: Koshino Taiki (#3)
Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

Attached is v2 of the patch for adding test.

This version updates the regression test expected output for the changed
CHECK constraint violation details. I also confirmed that all regression
tests pass.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Koshino Taiki <koshino@sraoss.co.jp>
送信日時: 2026年10月30日 18:29
宛先: Yash Jadhav <yash.jadhav8008@gmail.com>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Yugo Nagata <nagata@sraoss.co.jp>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi Yash,

Thank you for reviewing the patch.

For clients: any role can read CHECK expressions from, including for
tables it has no privileges on, so printing the expression doesn't
seem to expose anything new.

For the server log: an error entry already contains the table, column
and constraint names, so expression looks less sensitive compared to
them.

Anything I should improve on?

I agree that no additional security control seems necessary.

When the user has sufficient privileges to display the failing row, the client receives:

ERROR: new row for relation "check_detail_test" violates check constraint "age_check"
DETAIL: Failing row contains (15). Check constraint expression: (age >= 18).

When the user does not have sufficient privileges to display the failing row,
ExecBuildSlotValueDescription() returns NULL. The existing
"val_desc ? ... : 0" check then omits the entire DETAIL message:

ERROR: new row for relation "check_detail_test" violates check constraint "age_check"

The same applies to the server log because the DETAIL field is constructed by
the same code. Therefore, the CHECK expression is not sent to the client or
written to the server log when the failing row detail is suppressed.

I am preparing regression test fixes and will send an updated patch when they are
ready.

Regards,
Koshino

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Yash Jadhav <yash.jadhav8008@gmail.com>
送信日時: 2026年10月30日 4:23
宛先: Koshino Taiki <koshino@sraoss.co.jp>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Yugo Nagata <nagata@sraoss.co.jp>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

I went through the patch and have a few thoughts on the security question.

Is there a reason why the expression is not included in the error detail?
(For example, having such information appear in logs could pose a
security risk.)

For clients: any role can read CHECK expressions from, including for
tables it has no privileges on, so printing the expression doesn't
seem to expose anything new.

For the server log: an error entry already contains the table, column
and constraint names, so expression looks less sensitive compared to
them.

Anything I should improve on?

Regards,
Yash

Attachments:

t254338_4
v2-0001-Report-CHECK-expression-in-constraint-violation-d.patchapplication/octet-stream; name=v2-0001-Report-CHECK-expression-in-constraint-violation-d.patchDownload+89-81
#5Yash Jadhav
yash.jadhav8008@gmail.com
In reply to: Koshino Taiki (#4)
Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

cfbot is failing on v2 in the contrib/postgres_fdw regression test
(Linux Autoconf, Linux Meson, and others). Its expected output still
has the old DETAIL text for several check constraint violations.

I’ve attached a patch that updates
contrib/postgres_fdw/expected/postgres_fdw.out. I applied it on top of
v2, and make -C contrib/postgres_fdw check passes.

The attachment is named nocfbot, so cfbot doesn’t treat it as a
replacement for the patch set. You can apply the change into your next
version.

Regards,
Yash

Attachments:

nocfbot-Add-Missed-CHECK-DETAILS.patchtext/x-patch; charset=US-ASCII; name=nocfbot-Add-Missed-CHECK-DETAILS.patchDownload+8-9
#6Koshino Taiki
koshino@sraoss.co.jp
In reply to: Yash Jadhav (#5)
Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi Yash,

Thank you for investigating the cfbot failures and providing the
expected-output update.

I incorporated your changes to
contrib/postgres_fdw/expected/postgres_fdw.out into the next version of
the patch. The failures were caused by the newly added CHECK constraint
expression changing the DETAIL text, while the postgres_fdw expected
output still contained the previous messages.

After merging the changes, I ran:

make -C contrib/postgres_fdw check

and all postgres_fdw regression tests passed successfully. I will
include the updated expected output in the next patch version.

Thanks again for catching the missing regression test updates.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Yash Jadhav <yash.jadhav8008@gmail.com>
送信日時: 2026年11月15日 18:54
宛先: Koshino Taiki <koshino@sraoss.co.jp>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Yugo Nagata <nagata@sraoss.co.jp>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

cfbot is failing on v2 in the contrib/postgres_fdw regression test
(Linux Autoconf, Linux Meson, and others). Its expected output still
has the old DETAIL text for several check constraint violations.

I’ve attached a patch that updates
contrib/postgres_fdw/expected/postgres_fdw.out. I applied it on top of
v2, and make -C contrib/postgres_fdw check passes.

The attachment is named nocfbot, so cfbot doesn’t treat it as a
replacement for the patch set. You can apply the change into your next
version.

Regards,
Yash

Attachments:

t254338_6
v3-0001-Report-CHECK-expression-in-constraint-violation-d.patchapplication/octet-stream; name=v3-0001-Report-CHECK-expression-in-constraint-violation-d.patchDownload+97-89
#7Koshino Taiki
koshino@sraoss.co.jp
In reply to: Koshino Taiki (#6)
Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi Yash,

Thank you for investigating the cfbot failures and providing the

expected-output update.

I incorporated your changes to
contrib/postgres_fdw/expected/postgres_fdw.out into the next version of
the patch. The failures were caused by the newly added CHECK constraint
expression changing the DETAIL text, while the postgres_fdw expected
output still contained the previous messages.

After merging the changes, I ran:

make -C contrib/postgres_fdw check

and all postgres_fdw regression tests passed successfully. I will
include the updated expected output in the next patch version.

Thanks again for catching the missing regression test updates.

Regards,

Hi,

In addition to table CHECK constraints, I thought it would also be
useful to report the violated expression for domain CHECK constraints,
so I updated the patch to cover them as well.

For example, given a domain with a CHECK constraint, a violation is now
reported as follows:

ERROR: value for domain positive_int violates check constraint "positive_int_check"
DETAIL: Check constraint expression: (VALUE > 0).

Here, VALUE denotes the value being coerced to the domain, as in the
original domain CHECK expression.

I also added regression coverage for domain constraint violations and
updated the affected expected output files. The postgres_fdw expected
output fix provided by Yash is included as well.

The updated patch is attached.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Koshino Taiki <koshino@sraoss.co.jp>
送信日時: 2026年11月17日 17:58
宛先: Yash Jadhav <yash.jadhav8008@gmail.com>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi Yash,

Thank you for investigating the cfbot failures and providing the
expected-output update.

I incorporated your changes to
contrib/postgres_fdw/expected/postgres_fdw.out into the next version of
the patch. The failures were caused by the newly added CHECK constraint
expression changing the DETAIL text, while the postgres_fdw expected
output still contained the previous messages.

After merging the changes, I ran:

make -C contrib/postgres_fdw check

and all postgres_fdw regression tests passed successfully. I will
include the updated expected output in the next patch version.

Thanks again for catching the missing regression test updates.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Yash Jadhav <yash.jadhav8008@gmail.com>
送信日時: 2026年11月15日 18:54
宛先: Koshino Taiki <koshino@sraoss.co.jp>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Yugo Nagata <nagata@sraoss.co.jp>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

cfbot is failing on v2 in the contrib/postgres_fdw regression test
(Linux Autoconf, Linux Meson, and others). Its expected output still
has the old DETAIL text for several check constraint violations.

I’ve attached a patch that updates
contrib/postgres_fdw/expected/postgres_fdw.out. I applied it on top of
v2, and make -C contrib/postgres_fdw check passes.

The attachment is named nocfbot, so cfbot doesn’t treat it as a
replacement for the patch set. You can apply the change into your next
version.

Regards,
Yash

Attachments:

v4-0001-Report-CHECK-expression-in-constraint-violation-d.patchapplication/octet-stream; name=v4-0001-Report-CHECK-expression-in-constraint-violation-d.patchDownload+247-98
#8Koshino Taiki
koshino@sraoss.co.jp
In reply to: Koshino Taiki (#7)
Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

In addition to table CHECK constraints, I thought it would also be
useful to report the violated expression for domain CHECK constraints,
so I updated the patch to cover them as well.

For example, given a domain with a CHECK constraint, a violation is now
reported as follows:

ERROR: value for domain positive_int violates check constraint "positive_int_check"
DETAIL: Check constraint expression: (VALUE > 0).

Here, VALUE denotes the value being coerced to the domain, as in the
original domain CHECK expression.

I also added regression coverage for domain constraint violations and
updated the affected expected output files. The postgres_fdw expected
output fix provided by Yash is included as well.

The updated patch is attached.

Regards,

Hi,

I updated the patch so that it applies cleanly to the latest master.
The conflicts in execExpr.c and sqljson_queryfuncs.out have been
resolved while preserving the recent changes on master.

The relevant regression tests also pass. The updated v5 patch is
attached.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Koshino Taiki <koshino@sraoss.co.jp>
送信日時: 2026年11月18日 10:53
宛先: Yash Jadhav <yash.jadhav8008@gmail.com>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi Yash,

Thank you for investigating the cfbot failures and providing the

expected-output update.

I incorporated your changes to
contrib/postgres_fdw/expected/postgres_fdw.out into the next version of
the patch. The failures were caused by the newly added CHECK constraint
expression changing the DETAIL text, while the postgres_fdw expected
output still contained the previous messages.

After merging the changes, I ran:

make -C contrib/postgres_fdw check

and all postgres_fdw regression tests passed successfully. I will
include the updated expected output in the next patch version.

Thanks again for catching the missing regression test updates.

Regards,

Hi,

In addition to table CHECK constraints, I thought it would also be
useful to report the violated expression for domain CHECK constraints,
so I updated the patch to cover them as well.

For example, given a domain with a CHECK constraint, a violation is now
reported as follows:

ERROR: value for domain positive_int violates check constraint "positive_int_check"
DETAIL: Check constraint expression: (VALUE > 0).

Here, VALUE denotes the value being coerced to the domain, as in the
original domain CHECK expression.

I also added regression coverage for domain constraint violations and
updated the affected expected output files. The postgres_fdw expected
output fix provided by Yash is included as well.

The updated patch is attached.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Koshino Taiki <koshino@sraoss.co.jp>
送信日時: 2026年11月17日 17:58
宛先: Yash Jadhav <yash.jadhav8008@gmail.com>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi Yash,

Thank you for investigating the cfbot failures and providing the
expected-output update.

I incorporated your changes to
contrib/postgres_fdw/expected/postgres_fdw.out into the next version of
the patch. The failures were caused by the newly added CHECK constraint
expression changing the DETAIL text, while the postgres_fdw expected
output still contained the previous messages.

After merging the changes, I ran:

make -C contrib/postgres_fdw check

and all postgres_fdw regression tests passed successfully. I will
include the updated expected output in the next patch version.

Thanks again for catching the missing regression test updates.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Yash Jadhav <yash.jadhav8008@gmail.com>
送信日時: 2026年11月15日 18:54
宛先: Koshino Taiki <koshino@sraoss.co.jp>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Yugo Nagata <nagata@sraoss.co.jp>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

cfbot is failing on v2 in the contrib/postgres_fdw regression test
(Linux Autoconf, Linux Meson, and others). Its expected output still
has the old DETAIL text for several check constraint violations.

I’ve attached a patch that updates
contrib/postgres_fdw/expected/postgres_fdw.out. I applied it on top of
v2, and make -C contrib/postgres_fdw check passes.

The attachment is named nocfbot, so cfbot doesn’t treat it as a
replacement for the patch set. You can apply the change into your next
version.

Regards,
Yash

Attachments:

t254338_8
v5-0001-Report-CHECK-expression-in-constraint-violation-d.patchapplication/octet-stream; name=v5-0001-Report-CHECK-expression-in-constraint-violation-d.patchDownload+247-98
#9Koshino Taiki
koshino@sraoss.co.jp
In reply to: Koshino Taiki (#8)
Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

I updated the patch so that it applies cleanly to the latest master.
The conflicts in execExpr.c and sqljson_queryfuncs.out have been
resolved while preserving the recent changes on master.

The relevant regression tests also pass. The updated v5 patch is
attached.

Regards,

Hi,

Attached is v6 of the patch.

This version has been rebased onto the latest master. It includes the
expected-output updates for postgres_fdw, hstore_plpython, PL/Perl,
PL/Python, and PL/Tcl.

The patch reports the violated expression for both table and domain
CHECK constraints. For example:

ERROR: value for domain positive_int violates check constraint "positive_int_check"
DETAIL: Check constraint expression: (VALUE > 0).

I ran make check-world with PL/Perl,
PL/Python, and PL/Tcl enabled, and all tests passed.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Koshino Taiki <koshino@sraoss.co.jp>
送信日時: 2026年11月18日 15:28
宛先: Yash Jadhav <yash.jadhav8008@gmail.com>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

In addition to table CHECK constraints, I thought it would also be
useful to report the violated expression for domain CHECK constraints,
so I updated the patch to cover them as well.

For example, given a domain with a CHECK constraint, a violation is now
reported as follows:

ERROR: value for domain positive_int violates check constraint "positive_int_check"
DETAIL: Check constraint expression: (VALUE > 0).

Here, VALUE denotes the value being coerced to the domain, as in the
original domain CHECK expression.

I also added regression coverage for domain constraint violations and
updated the affected expected output files. The postgres_fdw expected
output fix provided by Yash is included as well.

The updated patch is attached.

Regards,

Hi,

I updated the patch so that it applies cleanly to the latest master.
The conflicts in execExpr.c and sqljson_queryfuncs.out have been
resolved while preserving the recent changes on master.

The relevant regression tests also pass. The updated v5 patch is
attached.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Koshino Taiki <koshino@sraoss.co.jp>
送信日時: 2026年11月18日 10:53
宛先: Yash Jadhav <yash.jadhav8008@gmail.com>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi Yash,

Thank you for investigating the cfbot failures and providing the

expected-output update.

I incorporated your changes to
contrib/postgres_fdw/expected/postgres_fdw.out into the next version of
the patch. The failures were caused by the newly added CHECK constraint
expression changing the DETAIL text, while the postgres_fdw expected
output still contained the previous messages.

After merging the changes, I ran:

make -C contrib/postgres_fdw check

and all postgres_fdw regression tests passed successfully. I will
include the updated expected output in the next patch version.

Thanks again for catching the missing regression test updates.

Regards,

Hi,

In addition to table CHECK constraints, I thought it would also be
useful to report the violated expression for domain CHECK constraints,
so I updated the patch to cover them as well.

For example, given a domain with a CHECK constraint, a violation is now
reported as follows:

ERROR: value for domain positive_int violates check constraint "positive_int_check"
DETAIL: Check constraint expression: (VALUE > 0).

Here, VALUE denotes the value being coerced to the domain, as in the
original domain CHECK expression.

I also added regression coverage for domain constraint violations and
updated the affected expected output files. The postgres_fdw expected
output fix provided by Yash is included as well.

The updated patch is attached.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Koshino Taiki <koshino@sraoss.co.jp>
送信日時: 2026年11月17日 17:58
宛先: Yash Jadhav <yash.jadhav8008@gmail.com>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi Yash,

Thank you for investigating the cfbot failures and providing the
expected-output update.

I incorporated your changes to
contrib/postgres_fdw/expected/postgres_fdw.out into the next version of
the patch. The failures were caused by the newly added CHECK constraint
expression changing the DETAIL text, while the postgres_fdw expected
output still contained the previous messages.

After merging the changes, I ran:

make -C contrib/postgres_fdw check

and all postgres_fdw regression tests passed successfully. I will
include the updated expected output in the next patch version.

Thanks again for catching the missing regression test updates.

Regards,

Taiki Koshino<koshino@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

________________________________
差出人: Yash Jadhav <yash.jadhav8008@gmail.com>
送信日時: 2026年11月15日 18:54
宛先: Koshino Taiki <koshino@sraoss.co.jp>
CC: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Yugo Nagata <nagata@sraoss.co.jp>
件名: Re: Proposal: Include CHECK constraint expression in violation error DETAIL

Hi,

cfbot is failing on v2 in the contrib/postgres_fdw regression test
(Linux Autoconf, Linux Meson, and others). Its expected output still
has the old DETAIL text for several check constraint violations.

I’ve attached a patch that updates
contrib/postgres_fdw/expected/postgres_fdw.out. I applied it on top of
v2, and make -C contrib/postgres_fdw check passes.

The attachment is named nocfbot, so cfbot doesn’t treat it as a
replacement for the patch set. You can apply the change into your next
version.

Regards,
Yash

Attachments:

t254338_9
v6-0001-Report-CHECK-expression-in-constraint-violation-d.patchapplication/octet-stream; name=v6-0001-Report-CHECK-expression-in-constraint-violation-d.patchDownload+270-98