From 73ff1d89001b8fc0fadf5e2808aeb92880c17394 Mon Sep 17 00:00:00 2001 From: anthonydb Date: Mon, 26 Apr 2021 07:08:35 -0400 Subject: [PATCH] Chapter 19 minor updates --- Chapter_19/Chapter_19.sql | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Chapter_19/Chapter_19.sql b/Chapter_19/Chapter_19.sql index 2924f7f..8ab6844 100644 --- a/Chapter_19/Chapter_19.sql +++ b/Chapter_19/Chapter_19.sql @@ -1,15 +1,9 @@ --- FIRST EDITION FILE; IGNORE - - - - - --------------------------------------------------------------- --- Practical SQL: A Beginner's Guide to Storytelling with Data +--------------------------------------------------------------------------- +-- Practical SQL: A Beginner's Guide to Storytelling with Data, 2nd Edition -- by Anthony DeBarros -- Chapter 19 Code Examples --------------------------------------------------------------- +---------------------------------------------------------------------------- -- VACUUM @@ -88,6 +82,8 @@ SELECT pg_size_pretty( SHOW config_file; +-- Listing 19-9: Sample postgresql.conf settings (see book for listing) + -- Listing 19-10: Show the location of the data directory SHOW data_directory; @@ -100,10 +96,10 @@ SHOW data_directory; -- BACKUP AND RESTORE -- Listing 19-11: Backing up the analysis database with pg_dump -pg_dump -d analysis -U [user_name] -Fc > analysis_backup.sql +pg_dump -d analysis -U [user_name] -Fc -v > analysis_backup.sql -- Back up just a table -pg_dump -t 'train_rides' -d analysis -U [user_name] -Fc > train_backup.sql +pg_dump -t 'train_rides' -d analysis -U [user_name] -Fc -v > train_backup.sql -- Listing 19-12: Restoring the analysis database with pg_restore