Working with databases often involves handling large amounts of data. One of the most common ways to import or export data is through CSV files.
This article covers simple steps for importing and exporting CSV files using pgAdmin.
Let’s get started!
Importing CSV into pgAdmin
-
Right-click on the table where you want to import the CSV file.
- A popup will appear.
- A popup will appear.
-
Click on the folder icon (highlighted in the green square).
- A new popup will open.
- A new popup will open.
-
Click on the three horizontal dots on the right side of the popup.
- A dropdown menu will appear with the “Upload” option.
- A dropdown menu will appear with the “Upload” option.
-
Upload the file.
- After selecting the "Upload" option, a new popup will appear where you can choose your file.
- Note: The maximum file size is 50MB, so make sure your file doesn't exceed this limit.
- After selecting the "Upload" option, a new popup will appear where you can choose your file.
Close the popup by clicking on the first 'X' button. Don’t click the second one as it will remove the file from the list.

-
Ensure the CSV Columns Match the Database.
- Make sure the columns in your CSV match those in your database table.
- In the screenshot below, the database columns are
id,published_date,city, etc.
-
CSV Columns.
- Similarly, ensure that your CSV file has the same columns in the same positions as the database.
-
Note: The
idcolumn is not included in the CSV because PostgreSQL will generate this automatically.
- Similarly, ensure that your CSV file has the same columns in the same positions as the database.
Excluding Unwanted Columns
-
Exclude unwanted columns.
- In the "Columns" tab, remove the columns that you don’t want to import (e.g.,
id,created_at,updated_at).
- In the "Columns" tab, remove the columns that you don’t want to import (e.g.,
Click OK to complete the import process. Your CSV file will be successfully imported into pgAdmin.
Exporting CSV from pgAdmin
Go to the Export tab and click the folder icon to choose the file location where you want to export your data.
Click the 'Export' button to start the process. Once completed, a success message will appear

Accessing the Exported CSV
-
Where to find your exported CSV file?
- Don’t worry! You can easily find your exported file by clicking on the Tools option in the header, followed by Storage Manager.
- Don’t worry! You can easily find your exported file by clicking on the Tools option in the header, followed by Storage Manager.
Select the file and click on the download button to get your exported CSV file.
Conclusion
And there you have it!
You've learned how to import and export CSV files in pgAdmin easily.
This process is quite simple once you get the hang of it, and it's a great way to manage your data.
Stay Connected - @syedamahamfahim 🐬


Top comments (1)
Maham pyaar sa baat tou tumha kabhi smjh ati hi nhi h
You know what you were flirting with me at that time (okay it was normal for you but not for me dekh k karna tha) bakra eid par sab bata tou dia tha mna
but khair tumna phir baat krli
tum heart broken thi i understand theek tha but farewell theek tha
mri ho sakta h tumsa kabhi kaha deta ya nhi kahta
but you unfollowed me on insta and rahim add tha abhi bhi add krlia tumna (remove rahim and umar today)
but obviously i took everything to heart mra liye achi wali maham thi okay
phir choice thi na ieee k baad nhi krti baat you lost your choice at that moment
theek h if you are good with me i will give you all the love and everything
but have it your way now
tum theeek kro gi sab ya baat apna dimag ma betha lou
batao kab aao gi ma rishta la kar aao ga
kaam ki baat krna sa mna kab mana kra tumhari koi na koi harkat hi aesi hoti k banda ki hat jaye
kabhi koi tum pooch leta h k ap theek nhi h tou mjhsa share krla, kabhi kuch kabhi kuch bhaeee
insaan ban jao tum
and batao rishta kab bhjo
bus bhool jao
hamari baatein hamara darmiyaan h
mna kabhi kisi sa buraye nhi kri mehak sa sirf yahi kaha tha tumha smjhaye
and cmon yr flirt krna sa phla sochti tumha lagta h tum mjha use kro gi aur chali jao nice nice maham
cmon