Re: dump-restore only one table

Поиск
Список
Период
Сортировка
От Alexander Kuprijanov
Тема Re: dump-restore only one table
Дата
Msg-id 200705012233.37190.sanya-spb@list.ru
обсуждение исходный текст
Ответ на Re: dump-restore only one table  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: dump-restore only one table  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Tuesday 01 May 2007 20:02:55 Tom Lane wrote:
> Alexander Kuprijanov <sanya-spb@list.ru> writes:
> > On Tuesday 01 May 2007 18:43:37 Tom Lane wrote:
> >> Works for me.  Perhaps your table name is mixed-case and you didn't
> >> quote it correctly?  Have you tried 'pg_restore -l' to verify what
> >> is in the dump file?
> >
> > no, tablenames  not mixed, all small-case letter
>
> Hmph.  I tried to reproduce your problem here (even to the extent of
> using 8.2 pg_dump to dump from an 8.1 database) but it works fine as
> far as I can tell.  If you leave off the --table option to pg_restore
> does it restore the data?  Can you put together a complete test-case
> to make it fail for someone else?
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org/

I make a test for simulation... (files test_a.sql.gz and  test_b.sql.gz you
can find in att.)

I do:
% createdb test_a; zcat test_a.sql.gz | psql -d test_a
% createdb test_b; zcat test_b.sql.gz | psql -d test_b
% echo 'select * from b' | psql test_a
 i  | n
----+---
  1 | 3
  2 | 3
  3 | 3
  4 | 3
  5 | 3
  6 | 3
  7 | 3
  8 | 3
  9 | 3
 10 | 3
(10 rows)

% echo 'select * from b' | psql test_b
 i  | n
----+---
  1 | 9
  2 | 9
  3 | 9
  4 | 9
  5 | 9
  6 | 9
  7 | 9
  8 | 9
  9 | 9
 10 | 9
(10 rows)

% pg_dump -d test_a --table=b -F c -v -f b.backup

ok, at now I want to update table "test_b.b" from table "test_a.b"

What command I need for to be happy? It must be very simple, but I'm creazy...
please help

--
Li ĵus elrampis el la ova ŝelo

Вложения

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

Предыдущее
От: "Andrej Ricnik-Bay"
Дата:
Сообщение: Re: Dynamically Allocated System Resources
Следующее
От: "Dann Corbit"
Дата:
Сообщение: Re: CHECK() Constraint on Column Using Lookup Table