Project

General

Profile

« Previous | Next » 

Revision 9427

lib/sh/local.sh: psql(): use $schema_esc, $table_esc instead of just putting $schema, $table in ""

View differences:

lib/sh/local.sh
42 42
		local dir="${dir:-$(dirname "$file")}"
43 43
	fi
44 44
	local dir="${dir:-$top_dir}"
45
	mk_schema_esc
46
	mk_table_esc
45 47
	
46 48
	local psql_cmd="psql_$(if can_log; then echo verbose; else echo script; fi)_vegbien"
47 49
	(cat <<EOF
48 50
\cd $dir
49
\set schema "$schema"
50
\set table "$table"
51
\set table_str '''"$table"'''
52
SET search_path TO "$schema", util;
51
\set schema $schema_esc
52
\set table $table_esc
53
\set table_str '''$table_esc'''
54
SET search_path TO $schema_esc, util;
53 55
EOF
54 56
	cat)|cmd_log_fd=1 \
55 57
	env no_search_path=1 "$psql_cmd" --output /dev/fd/11 "$@" 11>&1

Also available in: Unified diff