Dumps/Reloads - Mailing list pgsql-bugs

From Eric
Subject Dumps/Reloads
Date
Msg-id LMBBJJKMPNHFGKDGHLFKEEGMHCAA.emayo@pozicom.net
Whole thread Raw
List 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@pozicom.net

pgsql-bugs by date:

Previous
From: Lora Goldston
Date:
Subject: unknown object exception in postgresql-7.1.3 jdbc driver
Next
From: Kris Houghton
Date:
Subject: psql core dump