Обсуждение: PG_DUMP fails to load back in
Hi I am developing an app around postgresql and have been useing pg_dump as a backup. My problem comes when I to to reload the database, about half the tables are missing dure to a problem with a function. Most tables have part of there primary key set via a function that looks up data from a local table. But, pgdump is putting the functions at the end of the list so it's not there when the table is created. The other problem is if I move the function lines up in the dump file I neet to place the lookup table infront of the function. This is ok at the moment, but where will I be when I have 50 or 60 tables all requiring some function or other that need s aspecific table first... You can see my point, editing the dump file by hand for 5 tables and 2 functions is a minor paiun, for a larger effort... scary! Is there a way arrond this? -- Rob Brown-Bayliss ---======o======--- www.ZOOstation.cc
Rob Brown-Bayliss <rob@ZOOstation.cc> writes: > Most tables have part of there primary key set via a function that looks > up data from a local table. But, pgdump is putting the functions at the > end of the list so it's not there when the table is created. Try 7.1. regards, tom lane
On 02 Jun 2001 10:06:41 -0400, Tom Lane wrote: > Rob Brown-Bayliss <rob@ZOOstation.cc> writes: > > Most tables have part of there primary key set via a function that looks > > up data from a local table. But, pgdump is putting the functions at the > > end of the list so it's not there when the table is created. > > Try 7.1. Well I downloaded the redhat 7.1 rpms from the postgres ftp site for postgresql 7.1.1 but the failed to install as the rpms wanted to remove libpq.so.2 which they also need. I forced the issue and then coppied the libpq stuff from another machine and tried to upgrade as per the instructions - which failed, and then found the the postmaster can not be shut down either. So I am currently downgrading to 7.0.3 and awaiting enlightenment... Are the rpm's from postgres broken? -- Rob Brown-Bayliss ---======o======--- www.ZOOstation.cc