<story><title>Fly Postgres, Managed by Supabase</title><url>https://supabase.com/blog/postgres-on-fly-by-supabase</url></story><parent_chain><item><author>trevor-e</author><text>I looked into Supabase a while back but left confused on how to do a basic REST API. They auto-generate an API to interact with the tables you create which sounds neat, but like, where does the business logic live? I then checked out their edge functions but it wasn&amp;#x27;t clear if they are meant to be used that way since the examples are more oriented for tasks. Seems like I&amp;#x27;m not understanding something simple here.</text></item></parent_chain><comment><author>zoogeny</author><text>One thing to keep in mind which I found using Postgrest interface: you will end up having to put logic into stored procedures. The rest APIs are actually very convenient for aggregating data like joins, but I started to get stuck as soon as I wanted things like transactions. I also found that Row Level Security (RLS) for role based access was a chore and the developer experience of it left much to be desired.&lt;p&gt;If your DB needs are simple then the REST api is very convenient. But if you are planning anything of complexity then you&amp;#x27;ll have to bone up on your PL&amp;#x2F;pgsql or go for a regular db connection instead.</text></comment>
<story><title>Fly Postgres, Managed by Supabase</title><url>https://supabase.com/blog/postgres-on-fly-by-supabase</url></story><parent_chain><item><author>trevor-e</author><text>I looked into Supabase a while back but left confused on how to do a basic REST API. They auto-generate an API to interact with the tables you create which sounds neat, but like, where does the business logic live? I then checked out their edge functions but it wasn&amp;#x27;t clear if they are meant to be used that way since the examples are more oriented for tasks. Seems like I&amp;#x27;m not understanding something simple here.</text></item></parent_chain><comment><author>kiwicopple</author><text>(supabase team)&lt;p&gt;you have a few options:&lt;p&gt;1. connect to Postgres like you do with any other Postgres database. Supabase is just postgres&lt;p&gt;2. connect to PostgREST, the autogenerated REST API that you mention&lt;p&gt;3. connect using Edge Functions (Deno)&lt;p&gt;Most people are fine with 1. You can use 2 &amp;amp; 3 if you want to, they are just another tool in the shed</text></comment>