michelp / pgsodium

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

Doesn't work well with on conflict Json #96

Open irohitb opened 11 months ago

irohitb commented 11 months 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.