I am using this in postgresql to get userpseudoid out of column: trim(trailing ']]' from…
- User
I am using this in postgresql to get user_pseudo_id out of column: trim(trailing ']]' from reverse(split_part(reverse(split_part("customDimensions.value", '],', 1)), ' ,', 1))) as user_pseudo_id
Column itself is text value which equals something like this: [x, y, z, user_pseudo_id]
Can I speed it up?
- Assistant
To extract the
user_pseudo_idfrom a text column in PostgreSQL more efficiently, consider using the function, which can simplify and potentially speed up the operation. Assuming your column contains a string formatted like , you can use the following query:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.