1

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?

Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380

0 Answers0