Revision 12149
Added by Aaron Marcuse-Kubitza almost 11 years ago
sql.py | ||
---|---|---|
591 | 591 |
r'input has type "unknown"', msg) |
592 | 592 |
if match: raise MissingCastException('text', None, e) |
593 | 593 |
|
594 |
# type mismatches |
|
594 | 595 |
match = re.match(r'^.+? types (.+?) and (.+?) cannot be matched', msg) |
595 | 596 |
if match: |
596 | 597 |
type0, type1 = match.groups() |
597 | 598 |
raise MissingCastException(type0, None, e) |
599 |
match = re.match(r'operator does not exist: (.+?) = (.+)', msg) |
|
600 |
# these appear when a staging table column is of the wrong type |
|
601 |
if match: |
|
602 |
type0, type1 = match.groups() |
|
603 |
raise MissingCastException(type0, None, e) |
|
598 | 604 |
|
599 | 605 |
match = re.match(r'^.*?\brelation "(.+?)" is not a (table)', msg) |
600 | 606 |
if match: |
... | ... | |
614 | 620 |
type_, name = match.groups() |
615 | 621 |
raise DuplicateException(type_, name, e) |
616 | 622 |
|
623 |
# type mismatches which appear as "does not exist" errors |
|
617 | 624 |
match = re.match(typed_name_re+r' does not exist', msg) |
618 | 625 |
if match: |
619 | 626 |
type_, quote, name = match.groups() |
Also available in: Unified diff
lib/sql.py: parse_exception(): parse "operator does not exist" errors as MissingCastExceptions (these appear when a staging table column is of the wrong type)