• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1010
  • Last Modified:

postgres ERROR: null value in column ""xxxxx"" violates not-null constraint

I found the following message within syslog.

< message >
postgres ERROR:  null value in column ""xxxxx"" violates not-null constraint

Note: ""xxxxx"" is masked.

I am not developer but manage server.
Would you please tell me the meaning and the solution?
1 Solution
Here you are propably inserting or updating a table and are setting a column to a null (empty) value that is defined to not be allowed to be null. When using inserts, you are propably not specifying all columns.
(I belive that crossposting is forbidden, but for clarity's sake I rewrite here the solution I gave on the other post)

simply, a null value has been inserted in a column that forbids null value inserts.
You may have an error in some inserts.
You can manually modify it by issuing an update in the db

UPDATE tablename SET columnname = yournewvalue WHERE conditionblablabla
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now