The content of the column_name field in the error response for a constraint violation - Mailing list pgsql-hackers

From arkhipov.nr@gmail.com
Subject The content of the column_name field in the error response for a constraint violation
Date
Msg-id 3c215aef-9a5c-4eb0-9a30-3cd06a5e5ba5@Spark
Whole thread Raw
Responses Re: The content of the column_name field in the error response for a constraint violation
List pgsql-hackers
Hi,

I noticed that the error response for a constraint violation only contains the column name for not-null constraints. I'm confused because the field isn't present when other types of constraints are triggered, such as unique, foreign keys, and check constraints. Was this done intentionally because these other constraints may involve multiple columns, while the column_name field expects a single column?

I understand that a client can find out which columns are involved by a constraint name. Alternatively, should it be made more handy so that the column_name field is present for all constraints and includes all involved columns?

С уважением,
Архипов Никита

pgsql-hackers by date:

Previous
From: "cca5507"
Date:
Subject: Format the code in xact_decode
Next
From: Nitin Jadhav
Date:
Subject: Re: Show WAL write and fsync stats in pg_stat_io