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

Posted on 2009-04-16
Last Modified: 2012-05-06
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?
Question by:chunzi
    LVL 20

    Accepted 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.
    LVL 16

    Expert Comment

    (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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now