Masa331 blogging


Hi, i'm Premysl Donat and this is my blog about IT and my life in generall. I work at UOL and in my free time.. well, look at my Github.

Have a good one!


Copy data between 2 postgres dbs

# turns on/off tuples only => means no printing of headers/footers etc, just rows
psql=# \t
# turns on/off aligned output => basically pretty tables or not
psql=# \a
# sets output to some file. Turn off with another "\o"
psql=# \o FILE

# Load dump into currently connected database. Delimiter can be omitted if it's defaut one but i don't know which one is it and dump is delimited with '|'
\COPY table_name (columns) FROM dump_file DELIMITER '|';

psql copy docu

postgres sql copy docu