Thread: Problems with pg_dump...

Problems with pg_dump...

From
"Derricutt, Mark"
Date:
Hi, I've got a few problems with pg_dump that I was wondering if you guys
could help me out with.

I have my local database on my machine, and a database on a remote webserver
and I was wanting to move -one- table from my local db to the remote.

So I used "pg_dump -f mytable.sql -t cdcollection derricuttm" to dump just
that one table and uploaded it to my remote machine.

When I tried to import the table into the other database, it failed because
the used sequence didn't exist.  Shouldn't the -t option in pg_dump include
everything to recreate that particular table, such as its sequences?

Anyway, I added those lines to mytable.sql and reran it, and now get:

COPY "cdcollection" FROM stdin;
ERROR:  Bad date external representation '07-26-1999'
PQendcopy: resetting connection
CREATE UNIQUE INDEX "cdcollection_cd_id_key" on "cdcollection" using btree (
"cd_id" "int4  _ops" );
CREATE
EOF

The respective versions of PostgreSQL are:

  Local: 6.4 (I could only find the version number in PG_VERSION)
  Remote: [PostgreSQL 6.5.1 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3]

Have there been some changes in the way dates are handled between 6.4 anf
6.5.1?  Or should I be doing something different?

Mark