I have a column in a Postgres database that is of type varchar but has a binary value stored in it. How can I return the binary value of the column in a way I can read it?
For example, at the moment I see "r" in the column, I want to see the 1's and 0's that make up the value for r.
To be a bit more clear about what I want. I think the application is storing data about ticked checkboxes in binary. So for a group of checkboxes:
- Unchecked (0)
- Checked (1)
- Checked (1)
- Checked (1)
- Unchecked (0)
- Unchecked (0)
- Checked (1)
- Unchecked (0)
it stores the value "r" and I want to see the binary or hex of the value that is stored. So for the value "r" I want to get the hex value "72" or the binary value "0111 0010"