Project

General

Profile

« Previous | Next » 

Revision 7544

my2pg.data: Translate indefinite (zero) months which have a definite day. This is unusual, but does appear in some data such as the ARIZ DB.

View differences:

bin/my2pg.data
12 12
echo 'SET escape_string_warning = off;'
13 13
sed \
14 14
-e "s/'0000-00-00( 00:00:00)?'/'-infinity'/g" \
15
-e "s/('[[:digit:]]{4}-)00-00(')/\101-01\2/g" \
15
-e "s/('[[:digit:]]{4}-)00(-[[:digit:]]{2}')/\101\2/g" \
16 16
-e "s/('[[:digit:]]{4}-[[:digit:]]{2}-)00(')/\101\2/g" \
17 17
"$@"

Also available in: Unified diff