In Postgres I'm struggling with this syntax. It works in mysql but not sure what I'm doing wrong is.
So let's say I have a json document. I want to select a column in that document and return the result as "text"
So my query would look like this.
SELECT member_id, data->>'username' AS username
FROM player.player
Returns this as expected.
Now lets say I want to select a name from the column so my query would look like this.
SELECT member_id, data->>'username' AS username
FROM player.player WHERE username LIKE 'sam'
When I run the query I get this.
Why does it do that? The json I'm returning is returning as text data type since I'm using json->> on a column.

