Search Postgresql Archives

Re: dump-restore only one table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 01 May 2007 20:02:55 Tom Lane wrote:
> Alexander Kuprijanov <sanya-spb@xxxxxxx> 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

Attachment: test_a.sql.gz
Description: GNU Zip compressed data

Attachment: test_b.sql.gz
Description: GNU Zip compressed data


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux