wrong objects order using pg_dump

From: Oleg <evdakov(at)iwk(dot)uka(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: wrong objects order using pg_dump
Date: 2006-01-30 11:45:51
Message-ID: 43DDFC6F.5050403@iwk.uka.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Dear All,
I am trying to copy the PostGIS Database from Linux computer to Windows.
Under Linux Debian we have PostgreSQL 7.4.6, under Windows XP we have
PostgreSQL 8.1.0-2 .
I am creating dump under Linux with pg_dump myDB > myDBdump.sql
Under windows I am creating new DB (it is automatically PostGIS db) and
then using
psql -f myDBdump.sql -d myWinDB -U postgres
After accomplishing this request WinDB missing some Views. The problem
is that myDBdump.sql has in some places wrong order of CREATE VIEW and
CREATE TABLE statements.
For example:
CREATE VIEW myView AS SELECT .... myTable...;
is located before the:
CREATE TABLE myTable ....

while trying to create view the "relation "myTable" does not exist"
ERROR arised.

What is the right way to copy Database from one computer to another?
Thanks a lot in advance
Oleg

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jaime Casanova 2006-01-30 14:46:03 Re: wrong objects order using pg_dump
Previous Message Sean Davis 2006-01-30 11:43:55 Re: put text list into table form