Skip to content

Commit

Permalink
pg_use_copy is not default when loading to existing table
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Feb 28, 2024
1 parent d72d23f commit 729f821
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ data/FWA_STREAM_NETWORKS_SP.gdb.zip:
set -e; ogr2ogr \
-f PostgreSQL \
PG:$(DATABASE_URL) \
--config PG_USE_COPY YES \
-nln fwapg.fwa_stream_networks_sp \
-append \
-update \
Expand All @@ -111,6 +112,7 @@ data/FWA_STREAM_NETWORKS_SP.gdb.zip:
set -e; ogr2ogr \
-f PostgreSQL \
PG:$(DATABASE_URL) \
--config PG_USE_COPY YES \
-nln fwapg.fwa_linear_boundaries_sp \
-append \
-update \
Expand All @@ -133,6 +135,7 @@ data/FWA_STREAM_NETWORKS_SP.gdb.zip:
set -e; ogr2ogr \
-f PostgreSQL \
PG:$(DATABASE_URL) \
--config PG_USE_COPY YES \
-nln fwapg.fwa_watersheds_poly \
-append \
-update \
Expand All @@ -155,6 +158,7 @@ data/FWA_STREAM_NETWORKS_SP.gdb.zip:
set -e; ogr2ogr \
-f PostgreSQL \
PG:$(DATABASE_URL) \
--config PG_USE_COPY YES \
-nln fwapg.$(subst .make/,,$@) \
-append \
-update \
Expand All @@ -172,6 +176,7 @@ data/FWA_STREAM_NETWORKS_SP.gdb.zip:
ogr2ogr \
-f PostgreSQL \
PG:$(DATABASE_URL) \
--config PG_USE_COPY YES \
-nln $(subst .make/,fwapg.,$@) \
data/FWA_BC.gdb.zip \
$(shell echo $(subst .make/,,$@) | tr '[:lower:]' '[:upper:]')
Expand Down Expand Up @@ -208,6 +213,7 @@ data/WBD_National_GDB.zip:
ogr2ogr \
-f PostgreSQL \
PG:$(DATABASE_URL) \
--config PG_USE_COPY YES \
-t_srs EPSG:3005 \
-nln usgs.wbdhu12 \
-append \
Expand All @@ -230,6 +236,7 @@ data/WBD_National_GDB.zip:
ogr2ogr \
-f PostgreSQL \
PG:$(DATABASE_URL) \
--config PG_USE_COPY YES \
-t_srs EPSG:3005 \
-nln hydrosheds.hybas_lev12_v1c \
-append \
Expand Down

0 comments on commit 729f821

Please sign in to comment.