Revision 7542
Added by Aaron Marcuse-Kubitza almost 12 years ago
my2pg | ||
---|---|---|
4 | 4 |
# `--compatible=postgresql --add-locks=false --set-charset` |
5 | 5 |
# Usage: self {input...|<input} >translated |
6 | 6 |
|
7 |
selfDir="$(dirname -- "$0")" |
|
8 |
|
|
7 | 9 |
sedEreFlag="$(test "$(uname)" = Darwin && echo E || echo r)" |
8 | 10 |
|
9 | 11 |
sed () { "$(which sed)" -"$sedEreFlag" "$@";} |
... | ... | |
23 | 25 |
-e 's/ double/ double precision/g' \ |
24 | 26 |
-e 's/ (integer|bigint|double precision|float)(\([^)]*\))?( unsigned)?/ \1/g' \ |
25 | 27 |
-e 's/ datetime/ timestamp/g' \ |
26 |
-e "s/'0000-00-00( 00:00:00)?'/'-infinity'/g" \ |
|
27 |
"$@" |
|
28 |
"$@"\ |
|
29 |
|"$selfDir/my2pg.data" |
Also available in: Unified diff
my2pg: Use my2pg.data to perform data-only replacements, instead of duplicating them in both my2pg and my2pg.data