X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0831BD1B4FD for ; Fri, 10 Oct 2003 17:34:26 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 64125-04 for ; Fri, 10 Oct 2003 14:33:36 -0300 (ADT) Received: from mailhub.mail.Virginia.EDU (mail.Virginia.EDU [128.143.2.9]) by svr1.postgresql.org (Postfix) with ESMTP id 81FEED1B551 for ; Fri, 10 Oct 2003 14:33:35 -0300 (ADT) Received: from smtp.mail.Virginia.EDU (smtp.mail.Virginia.EDU [128.143.22.52]) by mailhub.mail.Virginia.EDU (Postfix) with ESMTP id 2E74E8CD81; Fri, 10 Oct 2003 13:33:35 -0400 (EDT) Received: from virginia.edu (d-137-133-128.bootp.Virginia.EDU [137.54.133.128]) by smtp.mail.Virginia.EDU (8.11.7/8.11.6) with ESMTP id h9AHXYl10006; Fri, 10 Oct 2003 13:33:34 -0400 Message-ID: <3F86EFFF.4020006@virginia.edu> Date: Fri, 10 Oct 2003 13:44:31 -0400 From: Jodi Kanter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephan Szabo Cc: Postgres Admin List Subject: Re: data restore References: <3F86E33F.2000500@virginia.edu> <20031010101059.S6614@megazone.bigpanda.com> In-Reply-To: <20031010101059.S6614@megazone.bigpanda.com> Content-Type: multipart/alternative; boundary="------------010809030703020404000808" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/123 X-Sequence-Number: 10684 This is a multi-part message in MIME format. --------------010809030703020404000808 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit It appears that some of these errors are due to the parent table being populated after the child table. Can I control the order of the copy statements in my script when I run the pg_dump? Stephan Szabo wrote: >On Fri, 10 Oct 2003, Jodi Kanter wrote: > > > >>Ok. sorry to confuse everyone...I got my restore to fun to completion so >>apparently my question about running restores in psql and the ordering >>of the data are not relevant. >>I do, however, have one other question I'd like to pose. >>I am getting serveral ref integrity errors which state that a FK value >>in one table does not exist in its parent table. However, when I go to >>the database to confirm this I can find no data that violates the >>constraint. Could the error be pointing to something less obvious? >> >> > >Hmm, two possibilities I can think off the top of my head are if the fk >values are being inserted and erroring and the pk rows are being done >after (which would make a later check look like this) or if there's any >inheritance involved (where a plain select will show child rows that don't >currently participate in the foreign key constraint). > > -- /_______________________________ //Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu / / / / / --------------010809030703020404000808 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit It appears that some of these errors are due to the parent table being populated after the child table. Can I control the order of the copy statements in my script when I run the pg_dump?

Stephan Szabo wrote:
On Fri, 10 Oct 2003, Jodi Kanter wrote:

  
Ok. sorry to confuse everyone...I got my restore to fun to completion so
apparently my question about running restores in psql and the ordering
of the data are not relevant.
I do, however, have one other question I'd like to pose.
I am getting serveral ref integrity errors which state that a FK value
in one table does not exist in its parent table. However, when I go to
the database to confirm this I can find no data that violates the
constraint. Could the error be pointing to something less obvious?
    

Hmm, two possibilities I can think off the top of my head are if the fk
values are being inserted and erroring and the pk rows are being done
after (which would make a later check look like this) or if there's any
inheritance involved (where a plain select will show child rows that don't
currently participate in the foreign key constraint).
  

--
________________________________

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu


 

 

 

--------------010809030703020404000808--