I've a JSONB column with the following content:
{"ibd": true, "participant_id": "P016", "sample_participant_id": "B1"}
If I query the value without the double quotation mark I get an error:
ERROR: invalid input syntax for type json LINE 1: ...ERE sample_metadata.metadata->'sample_participant_id' = 'B1'
for:
WHERE sample_metadata.metadata->'sample_participant_id' = 'B1'
But for
WHERE sample_metadata.metadata->'sample_participant_id' = '"B1"'
It works as expected. What I don't understand is why I need the double quotation mark. are they an actual value?
Thanks, Eden