You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say for this query to perform multiple updates given an array pick and spread:
UPDATE table t
SET some_int = u.val :: INT, some_uuid = u.id :: UUID
FROM (VALUES $$updates(val!, id!, uid!)) AS u(val, id, uid)
WHERE t.uid = u.uid :: UUID
The inferred type of the values in updates is automatically string. Is there any way to cast the values so values don't have to be cast where they are used?
i.e.
UPDATE table t
SET some_int = u.val, some_uuid = u.id
FROM (VALUES $$updates(val!, id!, uid!)) AS u(val :: INT, id :: UUID, uid :: UUID)
WHERE t.uid = u.uid
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Say for this query to perform multiple updates given an array pick and spread:
The inferred type of the values in
updates
is automaticallystring
. Is there any way to cast the values so values don't have to be cast where they are used?i.e.
Beta Was this translation helpful? Give feedback.
All reactions