Project

General

Profile

« Previous | Next » 

Revision 6233

schemas/functions.sql: _map(): Changed error message for an unmapped value to "Value not in map" rather than "Invalid map value", because an unmapped value is not necessarily explicitly invalid

View differences:

schemas/functions.sql
155 155
        BEGIN
156 156
            IF default_ = '*' THEN RETURN value;
157 157
            ELSIF default_ IS NOT NULL OR map ? '*' THEN RETURN default_; -- default provided
158
            ELSE RAISE 'Invalid map value: %', value USING ERRCODE = 'data_exception';
158
            ELSE RAISE 'Value not in map: %', value USING ERRCODE = 'data_exception';
159 159
            END IF;
160 160
        END;
161 161
    END IF;

Also available in: Unified diff