dump the database data - Mailing list pgsql-general

From Tony Smith
Subject dump the database data
Date
Msg-id 20050708160348.11784.qmail@web32603.mail.mud.yahoo.com
Whole thread Raw
Responses Re: dump the database data
List 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

pgsql-general by date:

Previous
From: Guy Fraser
Date:
Subject: Re: Pl/PgsSQL array
Next
From: Stephen Bowman
Date:
Subject: Re: Postgresql 7.4.8 inconsistent index usage