Project

General

Profile

« Previous | Next » 

Revision 10106

inputs/input.Makefile: sql/install: added $debug option to run the *.sql import verbosely, to display which statements are being run. this should only be used for SQL files that use COPY FROM to import data, to avoid echoing pages of insert statements.

View differences:

input.Makefile
6 6
##### Configuration
7 7

  
8 8
# Command line
9
debug ?=
9 10
full_import ?=
10 11
import_source ?= 1
11 12
log ?= $(if $(test),,1)
......
256 257
# Must come before %/install to override it
257 258
sql/install: $(dbExports)
258 259
	($(inDatasrc); cat $+|pg_dump_limit)|"time" env no_search_path=1 \
259
$(bin)/psql_script_vegbien --set=schema='"$(datasrc)"' $(logInstallRoot)
260
$(bin)/psql_$(if $(debug),verbose,script)_vegbien --set=schema='"$(datasrc)"' \
261
$(logInstallRoot)
260 262

  
263
# $debug option runs the *.sql import verbosely, to display which statements are
264
# being run. this should only be used for SQL files that use COPY FROM to import
265
# data, to avoid echoing pages of insert statements.
261 266
cleanup = $(if $(wildcard $*/cleanup.sql),($(inDatasrc); cat $*/cleanup.sql)\
262 267
|"time" $(psqlNoSearchPath) --echo-all --set=table='"$*"' $(logInstall*Add),\
263 268
(export schema=$(datasrc) table=$*; . $(bin)/vegbien_dest; unset schemas; \

Also available in: Unified diff