pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kris Kiger <kris@musicrebellion.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: dump contents & missing functions
Date: Wed, 31 Dec 2003 11:56:07 -0500
Message-ID: <10982.1072889767@sss.pgh.pa.us> (raw)
In-Reply-To: <3FF2F4BD.5000804@musicrebellion.com>
References: <20031015011052.GA8143@miltonstreet.com>
	<1066228820.24290.275.camel@linda.lfix.co.uk>
	<3FF2F4BD.5000804@musicrebellion.com>

Kris Kiger <kris@musicrebellion.com> writes:
> This whole issue arose when I set a default in a table row equal to a 
> value that a plpgsql function returns (ie the table default = 
> functionname(variable)).  However, after exploration of the dump files, 
> it appears that pg_restore tries to restore the tables before it 
> restores functions...hence I get an error upon restore of the original 
> dump, because the function does not yet exist.  Does anyone know if the 
> ordering of the restore is in fact the problem?  Any input is appreciated!

pg_restore has facilities for telling it to restore the dump contents in
a particular order (basically, get a table-of-contents listing and then
edit the listing).  I don't think it works to hack the tar file
directly.

Also you could try using development tip pg_dump, which should get the
dump order right to begin with.  AFAIK it will work okay with a 7.4
server.

			regards, tom lane



view thread (2+ messages)

Message-ID: <10982.1072889767@sss.pgh.pa.us>
Permalink:  ../10982.1072889767@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10982.1072889767@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kris@musicrebellion.com
  Subject: Re: dump contents & missing functions
  In-Reply-To: <10982.1072889767@sss.pgh.pa.us>
  References: <20031015011052.GA8143@miltonstreet.com> <1066228820.24290.275.camel@linda.lfix.co.uk> <3FF2F4BD.5000804@musicrebellion.com> <10982.1072889767@sss.pgh.pa.us>

* 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