Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id BBB5E632E65 for ; Sun, 11 Oct 2009 12:04:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 03213-06 for ; Sun, 11 Oct 2009 15:04:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.ecpi.com (mail.ecpi.com [64.128.16.3]) by mail.postgresql.org (Postfix) with ESMTP id 0F74C6326A1 for ; Sun, 11 Oct 2009 12:04:20 -0300 (ADT) Received: (qmail 5785 invoked by uid 89); 11 Oct 2009 15:04:06 -0000 Received: from unknown (HELO paulsen.homeip.net) (64.128.19.172) by mail4.ecpi.com with SMTP; 11 Oct 2009 15:04:06 -0000 Received: by paulsen.homeip.net (Postfix, from userid 1000) id DAE9711CB11; Sun, 11 Oct 2009 10:04:18 -0500 (CDT) From: Robert Paulsen To: Dmitriy Igrishin Subject: Re: ERROR: null value in column "id" violates not-null constraint Date: Sun, 11 Oct 2009 10:04:18 -0500 User-Agent: KMail/1.9.1 Cc: pgsql-sql@postgresql.org References: <200910101056.24051.robert@paulsenonline.net> <200910110735.58353.robert@paulsenonline.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910111004.18725.robert@paulsenonline.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200910/52 X-Sequence-Number: 33251 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