Goal: I'm trying to migrate my app to the production environment, but one of the queries gives an error when run in production.
Steps: I built a query "ListRacksForBled" in staging environment, it worked like a charm. Now I'm trying to run it against our production environment, but I there get an error message "trailing junk after numeric literal at or near "32f"" (see screenshot). It seems like it doesn't recognize that the variable I'm passing to it is of type "UUID".
I can have it fix in production by enclosing the variable in single quotes, but then I have issues in the staging environment. What could be the cause for it?
blen_id should be enclosed in either single or double quotes, like this: WHERE b.id = '{{ blen_id }}', since it's a string and the data type of b.id is UUID.
Thank you for your prompt answer!
When doing so, it works indeed in production, but I then get an error message in staging. See screenshot below.
Do you have any other idea for me?
Remove the single or double quote from the app, and add on the query. For example:
SELECT
r.*,
b.name as bled_name,
rp.label as rack_type,
b.status as bled_status
FROM racks r
LEFT JOIN bleds b ON r.bled_id = b.id
LEFT JOIN rack_positions rp ON r.position_id = rp.id
WHERE b.id = '{{ bled_id }}'