Обсуждение: Restoring 7.3.x Data on 7.2.x Database
I'm having trouble getting my data, which does have embedded newlines, to go from a 7.3.2 PostgreSQL setup to a 7.2.3. I'm using a service provider's database, so upgrading on my timeline isn't an option. The embedded newlines seem to choke the restore process on 7.2.x, although restoring the same data to another 7.3.2 database is no problem. Help! :) TIA, --Scott
On Wed, 7 May 2003, Scott W. Hill wrote: > I'm having trouble getting my data, which does have embedded newlines, to > go from a 7.3.2 PostgreSQL setup to a 7.2.3. I'm using a service provider's > database, so upgrading on my timeline isn't an option. The embedded > newlines seem to choke the restore process on 7.2.x, although restoring the > same data to another 7.3.2 database is no problem. Help! :) Is this all happening on the same basic platform, or are you running windows and Unix mixed? It might be easiest to just use awk or sed to strip out the newlines.
On Wed, 7 May 2003, Scott W. Hill wrote: > I'm having trouble getting my data, which does have embedded newlines, to > go from a 7.3.2 PostgreSQL setup to a 7.2.3. I'm using a service provider's > database, so upgrading on my timeline isn't an option. The embedded > newlines seem to choke the restore process on 7.2.x, although restoring the > same data to another 7.3.2 database is no problem. Help! :) How are you doing the dumps? You might want to try with -d (or -D) to get insert statements rather than copy. It's (alot) slower on restore, but it might handle the restore better.
Thanks! The -D option was just the trick. I wasn't able to use the other suggestion to use sed to strip the newlines, since the newlines were valid data in this case. --Scott Quoting Stephan Szabo <sszabo@megazone23.bigpanda.com>: > On Wed, 7 May 2003, Scott W. Hill wrote: > > > I'm having trouble getting my data, which does have embedded newlines, to > > go from a 7.3.2 PostgreSQL setup to a 7.2.3. I'm using a service > provider's > > database, so upgrading on my timeline isn't an option. The embedded > > newlines seem to choke the restore process on 7.2.x, although restoring > the > > same data to another 7.3.2 database is no problem. Help! :) > > How are you doing the dumps? You might want to try with -d (or -D) to get > insert statements rather than copy. It's (alot) slower on restore, but it > might handle the restore better. >