projects
/
pgsql-fix-value-too-long
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c0bf694
)
helper script to run dump and extract errors
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 17 Jan 2013 15:21:30 +0000
(16:21 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 17 Jan 2013 15:25:36 +0000
(16:25 +0100)
import-pgsql-dump.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/import-pgsql-dump.sh
b/import-pgsql-dump.sh
new file mode 100755
(executable)
index 0000000..
f7b7dcf
--- /dev/null
+++ b/
import-pgsql-dump.sh
@@ -0,0
+1,9
@@
+#!/bin/sh -xe
+
+touch errors
+(
+psql -l | grep ibatisti | awk '{ print $1 }' | xargs -i dropdb {}
+./pgsql-fix-value-too-long.pl errors $1 | \
+( psql --echo-queries template1 2>&1 )
+2>&1 ) | tee log
+grep -A 1 'value too long' log | tee -a errors