Revision 11352
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/local.sh | ||
---|---|---|
67 | 67 |
mk_table_esc |
68 | 68 |
|
69 | 69 |
use_local |
70 |
(cat <<EOF |
|
70 |
(if test "$schema" -a "$table"; then cat <<EOF
|
|
71 | 71 |
\cd $dir |
72 | 72 |
\set schema $schema_esc |
73 | 73 |
\set table $table_esc |
74 | 74 |
\set table_str '''$table_esc''' |
75 | 75 |
SET search_path TO $schema_esc; |
76 | 76 |
EOF |
77 |
fi |
|
77 | 78 |
cat${file:+ "$file"} |
78 | 79 |
)|psql__db_sh "$@" |
79 | 80 |
} |
Also available in: Unified diff
bugfix: lib/sh/local.sh: psql(): only \set schema, table if $schema, $table are non-empty, because otherwise, you will get a "zero-length delimited identifier" error