postgresql - How to import data from a particular table from a large postgres file? -


i want import data particular tables in postgres. how can that?

i've tried following command. didnt worked though.

pg_dump -u postgres -a -d -t data_pptlconfig db_name  > db_file 

assuming mean "a dump" when "postgres file":

if it's sql format dump, you'd have extract part want text editor , run part. dump sql "program" re-create database, there's no other way selectively restore bits of it.

if it's custom-format dump, can use pg_restore -t flag.

use file the-dump-file find out if not know. or @ file text editor - if first 5 bytes pgdmp it's postgresql custom format dump; otherwise it'll sql format dump.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -