Query failed: ERROR: invalid input syntax for type boolean: ""