This procedure is defined in the server but not documented via ad_proc or proc_doc and may be intended as a private interface.

The procedure is defined as:

proc ::ns::stats::quote {value} {
    
    if {[string first \x00 $value] >= 0} {
        return "CAST(X'[binary encode hex [encoding convertto utf-8 $value]]' AS TEXT)"
    }
    return "'[string map [list ' ''] $value]'"

}

Show another procedure: