dump the database data

From: Tony Smith <quickcur(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: dump the database data
Date: 2005-07-08 16:03:47
Message-ID: 20050708160348.11784.qmail@web32603.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have tables create by:

create table address(
id serial PRIMARY KEY,
...);

create table user(
id serial PRIMARY KEY,
name text not NULL,
addressId integer REFERENCES address(id) NOT NULL,
UNIQUE(name)
);

...

I have used the database for sometime and now I would
like to do a dump and put the data to a sql file. I
used

pg_dump -d ....

In my dump file I found the insert statements
something like:

INSERT into user values(5, "George", 1);
INSERT into user values(6, "Richard", 3);
INSERT into user values(7, "Pete", 6);

I create the same tables in another database and run
the above insert statement, the data was inserted, but
the seq of user is not updated, it is still pointed to
one. What is wrong?

Thans,

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Bowman 2005-07-08 16:04:07 Re: Postgresql 7.4.8 inconsistent index usage
Previous Message Guy Fraser 2005-07-08 16:00:51 Re: Pl/PgsSQL array