Querying a bytea field using postgrex

115 Views Asked by At

I'm attempting to query a table in postgres with the following:

result =
    Postgrex.query!(pg, "SELECT owner_id, connected_at FROM devices WHERE id = $1", [device_id])
# result = []

The device_id variable is an Elixir string, and this query used to work when the id and owner_id columns were text. But they've been changed to bytea and my query is now not returning any rows.

There is a single matching row in the table. How do I fix this?

0

There are 0 best solutions below