Exporting / Importing Data With PostgreSQL

Publié le: 17 février 2026
sur la chaîne: Relational Databases and SQL for Beginners
96
4

In this video, you will explore the methods of exporting and importing data using PostgreSQL through the psql command line interface.
We will examine the functionality of the COPY TO and COPY FROM commands while working with a variety of file formats, including text, CSV, compressed, and binary.
Additionally, we will address the challenge of importing data that have conflicting primary and foreign keys by demonstrating how to reassign these keys.
Finally, you will learn how to effectively utilize the pg_dump and pg_restore commands to streamline your data export and import processes across multiple file formats.

gzip installations:
https://cygwin.com/install.html
Run the installation (if desired, you can install only gzip by entering 'gzip' in the search window of the installer)
In 'Environment Variables' - 'System variables' add to 'Path' Variable
For example - C:\cygwin64\bin
May require a re-boot

https://gnuwin32.sourceforge.net/pack...
Simpler installation but this is an older version of gzip
Choice of running an install (setup) or downloading the binaries in a zip file.

Text Editor (Notepad++):
https://notepad-plus-plus.org/

GitHub (code used in this video):
https://github.com/RelationalDatabase...

00:00 Overview
01:02 About CSV
01:48 Using COPY Command Overview
02:47 Exporting Using COPY Overview
04:59 Exporting Using COPY Implementation
10:19 Importing Using COPY Overview
11:27 Importing Using COPY Implementation
14:47 Re-assigning Primary/Foreign Keys for Import Overview
14:47 Re-assigning Primary/Foreign Keys for Import Implementation
22:52 Exporting/Importing Data With pgAdmin
27:42 Using pg_dump for Export Overview
30:10 Using pg_dump for Export Implementation
36:00 Importing Data From a Plain-Text SQL File Overview
36:40 Importing Data From a Non-Plain-Text SQL File Overview
38:08 Restoring SQL files
39:15 Using psql to Restore From Plain-Text SQL Files
41:08 Using pg_restore to Restore From Non-Plain-Text SQL Files
44:00 Like and Subscribe
#postgresql #postgresqltutorial #importexport


Sur cette page du site, vous pouvez voir la vidéo en ligne Exporting / Importing Data With PostgreSQL durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Relational Databases and SQL for Beginners 17 février 2026, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 96 fois et il a aimé 4 téléspectateurs. Bon visionnage!