I am using pgAdmin 4 and am looking to download query results as INSERT
statements rather than as a CSV (the only option I can find). I am used to doing this with MySQL Workbench, but maybe I have been spoiled over there?
Is it possible in pgAdmin 4 to download query results as INSERT
statements?
Best Answer
If you need this for moving data among databases, as you indicate in your comments, I'd suggest using
psql
and its\copy
command.This will definitely work, as it writes the files onto the local machine (the one the client is running on, eg. your laptop), and if you can connect using pgAdmin 4, you can also connect using
psql
.The process would look like
The file location syntax assumes you are on Linux.