Revision 6301
Added by Aaron Marcuse-Kubitza about 12 years ago
lib/sql.py | ||
---|---|---|
593 | 593 |
if function_exists(db, func) and msg.find('CAST') < 0: |
594 | 594 |
# not found only because of a missing cast |
595 | 595 |
type_ = function_param0_type(db, func) |
596 |
col = None |
|
596 | 597 |
if type_ == 'anyelement': type_ = 'text' |
597 |
raise MissingCastException(type_, None, e) |
|
598 |
elif type_ == 'hstore': # cast just the value param |
|
599 |
type_ = 'text' |
|
600 |
col = 'value' |
|
601 |
raise MissingCastException(type_, col, e) |
|
598 | 602 |
raise DoesNotExistException(type_, name, e) |
599 | 603 |
|
600 | 604 |
raise # no specific exception raised |
Also available in: Unified diff
sql.py: parse_exception(): function MissingCastException: If 1st param is hstore, only perform the cast on the value param. This fixes a bug in _map() calls whose value is a non-text type, such as SALVIAS.plotMetadata.AccessCode.