Skip to content
Snippets Groups Projects
Commit c2be8458 authored by Vladislav Shpilevoy's avatar Vladislav Shpilevoy Committed by Nikita Pettik
Browse files

sql: implicit boolean cast to text returns uppercase

Explicit cast uses uppercase, and the patch makes the
implicit cast the same.

Upper case is the standard according to SQL standard
2011, cast specification 6.13, general rules 11.e:

    General rules

    11) If TD is variable-length character string or
        large object character string, then let MLTD
        be the maximum length in characters of TD.

        e) If SD (source type) is boolean, then Case:

            i)   If SV is True and MLTD is not less
                 than 4, then TV is 'TRUE'.

            ii)  If SV is False and MLTD is not less
                 than 5, then TV is 'FALSE'.

            iii) Otherwise, an exception condition is
                 raised: data exception — invalid
                 character value for cast.

Part of #4462
parent 86b0f21d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment