Search Postgresql Archives

dump-restore only one table

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

 



Hello

I have a stooped trable... I have equal bases <BaseA> and <BaseB>, and next 
table <TableA> on each of them

CREATE TABLE <TableA>
(
  idstation int4 NOT NULL DEFAULT serial,
  ru_name varchar,
  en_name varchar,
  address varchar,
     <...other fields...>
  CONSTRAINT idstation_pkey PRIMARY KEY (idstation),
  CONSTRAINT idcurrency_fkey FOREIGN KEY (idcurrency)
      REFERENCES awp_books.idcurrency (code) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
    <...other constrations...>
) 
WITHOUT OIDS;

other tables have references on <TableA>, 
but I need update my table <BaseB.TableA> with data from <BaseA.TableA>

I do:
==============
pg_dump -d BaseA --port=54321 --host=localhost --table=TableA --data-only -F 
c -v | pg_restore -d 
BaseB --data-only --no-owner --table=TableA --single-transaction -v
==============

==== output =====
pg_dump: reading schemas
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined conversions
pg_dump: reading user-defined tables
pg_dump: reading table inheritance information
pg_dump: reading rewrite rules
pg_dump: reading type casts
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
pg_dump: finding the columns and types of table "idstation"
pg_dump: finding default expressions of table "idstation"
pg_dump: flagging inherited columns in subtables
pg_dump: reading indexes
pg_dump: reading indexes for table "idstation"
pg_dump: reading constraints
pg_dump: reading foreign key constraints for table "idstation"
pg_dump: reading triggers
pg_dump: reading triggers for table "idstation"
pg_dump: reading dependency data
pg_dump: saving encoding = WIN1251
pg_dump: saving standard_conforming_strings = off
pg_restore: connecting to database for restore
=============

But <BaseB.TableA> wasn't updated.... why?? 


-- 
Kiu nenion valoras, plej multe sin gloras


[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