Project

General

Profile

« Previous | Next » 

Revision 5791

sql_io.py: cast(): Set the created function's value param type to anyelement to support any input type, not just text

View differences:

lib/sql_io.py
143 143
    # Create function definition
144 144
    modifiers = 'STRICT'
145 145
    if not save_errors: modifiers = 'IMMUTABLE '+modifiers
146
    value_param = sql_gen.FunctionParam('value', 'text')
146
    value_param = sql_gen.FunctionParam('value', 'anyelement')
147 147
    handler = data_exception_handler('RETURN NULL;\n', srcs, errors_table,
148 148
        value_param.name)
149 149
    body = sql_gen.CustomCode(handler.to_str(db, '''\

Also available in: Unified diff