Dumps/Reloads

From: "Eric" <emayo(at)pozicom(dot)net>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Dumps/Reloads
Date: 2001-10-16 14:40:34
Message-ID: LMBBJJKMPNHFGKDGHLFKEEGMHCAA.emayo@pozicom.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Not sure how to classify this...

Here is the scenario:

create database pozicom;

create table employees(....);

create table emppayrate(....);

create function getemprate(...);

If I pg_dump pozicom > /tmp/pozicom.dump then log in and \i
/tmp/pozicom.dump everything works fine until.

Now I need to make a change to the emppayrate table so I:

drop table emppayrate;

create table emppayrate(... new field or whatever)....

Now if I pg_dump the database and try to import it, the function,
getemprate, complains that the emppayrate table is not there!

Viewing the .dump file I can see it is simply a placement issue. Moving the
"create function" statement to the end and before the data corrects the
problem.

So, I am not sure if this is a bug or if I am over looking something.

Is there a way to do the dump such that the functions are always last?

Hope this helps! Sorry if this is not a bug and I am not getting something
but I couldn't find any other advise.

Eric
Pozicom Tech.
emayo(at)pozicom(dot)net

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2001-10-16 15:03:34 Re: SQLCODE==-209
Previous Message Bruce Momjian 2001-10-16 13:57:59 Re: Bug #478: Integer overflow in pg_dump