postgres copy tables

-1

Hello I have a database in postgres 9 which I have 139 tables but I need to copy only 7 tables that are new to put them in another database, If you can tell me how I thank you Thank you.

    
asked by Jorge E. 02.08.2017 в 16:25
source

1 answer

1

From the command line:

EXPORT TABLE

pg_dump -i -h [servidor] -p 5432 -U [usuario] -t [tabla] -F p -b -v -f "mitabla.sql" [basedatos]

IMPORT TABLE

psql -h [servidor] -d [basedatos] -U [usuario] -f "mitabla.sql"
    
answered by 02.08.2017 / 17:04
source