0

I am working on a smaller project. I have two tables e.g. properties and agents. One property can have many agents. How can I update data in both tables using one query? Here is the link to update data in postgres How I can update one to many relation in Postgres?

umar muaz
  • 1
  • 1
  • 1
    You can probably generate a function similar to the answer there. Then call this function [using RPC](https://supabase.com/docs/reference/javascript/rpc) – Mansueli Jul 25 '22 at 21:25

1 Answers1

0

Supabase uses postgrest under the hood for the RESTful api, currently the suggested solution there is to write an rpc() function and call that.

Alternatively, since Supabase is just PostgreSQL, you always have the option of connecting directly using any postgres client and using the postgres solution you mentioned in your question.

Awalias
  • 2,027
  • 6
  • 31
  • 51