First, you need and install PGToTxt.
PGToTxt is a tool to batch unload PostgreSQL data to TXT files.
Using PGToTxt you can batch unload PostgreSQL data to TXT files easily and fast.
More about PGToTxt – the tool to batch unload data from PostgreSQL tables data to TXT files