diff --git a/Chapter_18/psql_commands.txt b/Chapter_18/psql_commands.txt index 2e0afc7..d72ee10 100644 --- a/Chapter_18/psql_commands.txt +++ b/Chapter_18/psql_commands.txt @@ -66,7 +66,7 @@ DELETE FROM state_regions; DELETE FROM state_regions; -psql -d analysis -U postgres -c "COPY state_regions FROM STDIN WITH (FORMAT CSV, HEADER);" < state_regions.csv +psql -d analysis -U postgres -c "COPY state_regions FROM STDIN WITH (FORMAT CSV, HEADER);" < C:\YourDirectory\state_regions.csv -- Listing 18-9: Saving query output to a file @@ -95,9 +95,10 @@ createdb -U postgres -e box_office -- Loading shapefiles into PostgreSQL --- For the US Census county shapefile in Chapter 14: +-- For the US Census counties shapefile in Chapter 15: shp2pgsql -I -s 4269 -W Latin1 tl_2019_us_county.shp us_counties_2019_shp | psql -d analysis -U postgres --- For the Santa Fe roads and waterways shapfiles in Chapter 14: -shp2pgsql -I -s 4269 tl_2016_35049_roads.shp santafe_roads_2016 | psql -d analysis -U postgres -shp2pgsql -I -s 4269 tl_2016_35049_linearwater.shp santafe_linearwater_2016 | psql -d analysis -U postgres +-- For the Santa Fe roads and waterways shapfiles in Chapter 15: +shp2pgsql -I -s 4269 tl_2019_35049_roads.shp santafe_roads_2019 | psql -d analysis -U postgres +shp2pgsql -I -s 4269 tl_2019_35049_linearwater.shp santafe_linearwater_2019 | psql -d analysis -U postgres +