Re: pg_restore duplicate key violations

Поиск
Список
Период
Сортировка
От Karl O. Pinc
Тема Re: pg_restore duplicate key violations
Дата
Msg-id 1147188013l.18374l.5l@mofo
обсуждение исходный текст
Ответ на Re: pg_restore duplicate key violations  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_restore duplicate key violations  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 05/08/2006 06:42:18 PM, Tom Lane wrote:
> "Karl O. Pinc" <kop@meme.com> writes:
> > I'm having trouble with a dump and restore:
>
> > $ pg_dump --format=t --schema=babase --data-only --user babase_admin
>
> > babase_test | pg_restore --data-only --disable-triggers --user
> > babase_admin --dbname=babase
> > pg_restore: ERROR:  duplicate key violates unique constraint
> > "activities_pkey"
> > CONTEXT:  COPY activities, line 1: "B   t       t       Be groomed"
>
> Um ... it looks to me like you're trying to restore into an existing
> table that already has the same data loaded ...

That's what I thought at first, except that I had just created
the db structure with a script.  Just in case I checked with
a select from psql.  I even looked at the dump (as text) output to
check that it wasn't doing something wierd like loading things
twice.  Turns out this table is the first to have data loaded into
it.

I'm not clear on where to start with this.


Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein


В списке pgsql-general по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Arguments Pro/Contra Software Raid
Следующее
От: Ryan Suarez
Дата:
Сообщение: Exporting postgres query to CSV