Re: Preserving data after updates

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Berend Tober <btober(at)seaworthysys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Preserving data after updates
Date: 2005-05-19 17:10:57
Message-ID: 5462.1116522657@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Berend Tober <btober(at)seaworthysys(dot)com> writes:
> Tom Lane wrote:
>> Hmm, it shouldn't do that ... and in a quick test here I couldn't
>> reproduce any such bug. What version of pg_dump are you using?

> Sorry I failed to specify. Production version is 7.3.1 (change is
> hard!), although I origianally worked out the implementation on version
> 8. I bet that is the problem.

The case I tested seems to work in 7.3 as well:

CREATE TABLE person (last_name varchar(24),
first_name varchar(24),
CONSTRAINT person_name_check CHECK (((last_name IS NOT NULL) OR
(first_name IS NOT NULL))));

CREATE TABLE person_change_history(
action VARCHAR(6),
update_date TIMESTAMP NOT NULL DEFAULT NOW(),
update_user NAME NOT NULL DEFAULT CURRENT_USER
) INHERITS (person);

pg_dump puts the CONSTRAINT only on person, as it should. I'm testing
7.3.10 but I don't see any changes in the 7.3 CVS log that look related.
Can you put together a reproducible test case?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2005-05-19 17:19:16 Re: Postgres in government
Previous Message Joshua D. Drake 2005-05-19 17:07:54 Re: Postgres in government

Browse pgsql-hackers by date

  From Date Subject
Next Message Juan Pablo Espino 2005-05-19 17:36:48 C array from SQL array?
Previous Message Tom Lane 2005-05-19 16:57:09 Re: Two-phase commit issues