michelp / pgsodium

Modern cryptography for PostgreSQL using libsodium.
Other
555 stars 32 forks source link

Doesn't work well with on conflict Json #96

Open irohitb opened 1 year ago

irohitb commented 1 year ago

I have this code

 token_value := jsonb_build_object(
    'token', token,
    'workspace_name', workspace_name, 
    'user', user_email
  );

  INSERT INTO services_connected (workspace_id, service_name, data)
  VALUES (workspace_id_value, 'google', token_value)
  ON CONFLICT (workspace_id, service_name) DO UPDATE SET data = EXCLUDED.data;

this works fine but ON CONFLICT, the value stored is incorrect.