I have a PostgreSQL table, and there's a userid column which data type is uuid. Given…
- User
I have a PostgreSQL table, and there's a user_id column which data type is uuid.
Given that uuid, I want to update a expired_at column which datatype is timestampz.
I tried a few queries, like:
UPDATE public.session SET expired_at = '2025-06-18 15:41:30.489 +00:00' WHERE user_id::text = "32e9b5cb-d033-4c57-a4b9-dcca911e013"; UPDATE public.session SET expired_at = '2025-06-18 15:41:30.489 +00:00' WHERE user_id = cast('32e9b5cb-d033-4c57-a4b9-dcca911e013') as uuid; UPDATE public.session SET expired_at = '2025-06-18 15:41:30.489 +00:00' WHERE user_id = '32e9b5cb-d033-4c57-a4b9-dcca911e013'::uuid;
Nothing works. Postgres will complain something like:
SQL Error [22P02]: ERROR: invalid input syntax for type uuid: "32e9b5cb-d033-4c57-a4b9-dcca911e013" Position: 89
Error position: line: 1 pos: 88
What's wrong here?
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.