pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Paulsen <robert@paulsenonline.net>
To: Dmitriy Igrishin <dmitigr@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: ERROR: null value in column "id" violates not-null  constraint
Date: Sun, 11 Oct 2009 10:04:18 -0500
Message-ID: <200910111004.18725.robert@paulsenonline.net> (raw)
In-Reply-To: <b4399d110910110622s7b98a96fk52416b080e9b33a@mail.gmail.com>
References: <200910101056.24051.robert@paulsenonline.net>
	<200910110735.58353.robert@paulsenonline.net>
	<b4399d110910110622s7b98a96fk52416b080e9b33a@mail.gmail.com>

On Sunday 11 October 2009 8:22 am, Dmitriy Igrishin wrote:
> Hello!
>
> Please, read pg_dump(1) manual page. You will find this text in it:
> "It is  not guaranteed that pg_dump's output can be loaded into a server of
> an older major version -- not even if the dump was taken from a  server
> of  that  version. Loading a dump file into an older server may require
> manual editing of the dump file to remove syntax not understood by  the
> older server."
>

Yes, I understand that.

I tried it only to see if that was the mistake I made in the first place 
which, if that is indeed what happened, was completely inadvertent. I have 
sever different postgress servers set up and I had temporarily moved that 
database (using dump/restore) while experimenting with the system that 
normally hosts it.

The results of my trial restore to 8.0 from an 8.2 dump were *negative* in 
that it did NOT recreate the situation I had stumbled into. As a matter of 
fact the restore failed completely instead of just dropping the DEFAULT 
attribute. There must have been more to the original screw-up, perhaps some 
editing on my part but, as I said, I don't remember doing that.

Also, the temporary setup (on 8.2) exhibited the same "missing default" error 
as the original so apparently the situation was there, unnoticed, since 
before moving the database from 8.0 to 8.2. 

After fixing up the original 8.0 database (by editing the dump data as 
discussed earlier in this thread) and doing a dump/restore to re-establish 
the temporary 8.2 setup the missing default did NOT happen on 8.2 so however 
my original problem came about is still a mystery to me.

Bob



view thread (12+ messages)

Message-ID: <200910111004.18725.robert@paulsenonline.net>
Permalink:  ../200910111004.18725.robert@paulsenonline.net/
Also on:    postgresql.org/message-id/200910111004.18725.robert@paulsenonline.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: robert@paulsenonline.net, dmitigr@gmail.com
  Subject: Re: ERROR: null value in column "id" violates not-null  constraint
  In-Reply-To: <200910111004.18725.robert@paulsenonline.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox