Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work well with on conflict Json #96

Open
irohitb opened this issue Oct 14, 2023 · 0 comments
Open

Doesn't work well with on conflict Json #96

irohitb opened this issue Oct 14, 2023 · 0 comments

Comments

@irohitb
Copy link

irohitb commented Oct 14, 2023

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.

@irohitb irohitb changed the title Doesn't work well with onConflict Json Doesn't work well with ON CONFLICT Json Oct 14, 2023
@irohitb irohitb changed the title Doesn't work well with ON CONFLICT Json Doesn't work well with on conflict Json Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant