Skip to content

Instantly share code, notes, and snippets.

@daGrevis
Created March 17, 2019 00:59
Show Gist options
  • Select an option

  • Save daGrevis/2bb77784ad2ebaed5c3d023dc2e7d869 to your computer and use it in GitHub Desktop.

Select an option

Save daGrevis/2bb77784ad2ebaed5c3d023dc2e7d869 to your computer and use it in GitHub Desktop.
UPDATE "messages"
SET
"meta" = jsonb_set("meta", '{mode}', concat('"', "text", '"')::jsonb),
"text" = concat("nick", ' set ', "text", ' on ', "meta"->>'param');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment