Tag Info

New answers tagged


you can use "\conninfo" in psql


For batch operation I generally use: psql -v ON_ERROR_STOP=1 -P pager=off --single-transaction ... however, generally psql should detect that stdout is not a terminal and automatically turn pager off if you're redirecting its stdout.


Assuming the psql command-line tool, you may use \copy instead of copy. \copy opens the file and feeds the contents to the server, whereas copy tells the server the open the file itself and read it, which may be problematic permission-wise, or even impossible if client and server run on different machines with no file sharing in-between. Under the hood, ...

Top 50 recent answers are included