You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pass --quiet to psql
This ensures that only the query output is printed and any other output,
such as messages resulting from a .psqlrc file, are suppressed.
Ignore empty STDIN
This happens when psql2csv is run in the context of another script that
happens to have STDIN open, e.g.:
echo "psql2csv 'select 1'" | sh
Use COPY instead of \copy
\copy is a wrapper around COPY which simply sets the output to STDOUT in
order to create a local file. Since we're outputting to STDOUT anyways,
there's no point in using \copy.