how to create table in supabase via api #33844
Replies: 4 comments 3 replies
-
You would use SQL thru the database port typically. Some users have called rpc functions which then use SQL to create a table. Creating tables though dynamically is not a great idea though. |
Beta Was this translation helpful? Give feedback.
-
If I use the call rpc function to pass in the table creation statement, an error will be reported, permission denied for schema public. How should this be solved? |
Beta Was this translation helpful? Give feedback.
-
There are threads here in discussions and just googling the web for postgres create table with a function. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your guidance. Now I can create tables, but every time I change the database, it is not just creating tables, but also modifying tables, deleting tables, creating indexes, creating views and other operations. I should not need to create so many RPC functions to parse them. Is there a better solution for this problem? |
Beta Was this translation helpful? Give feedback.
-
I can only find the console in supabase to manually create a table, but I don't see any API that can create a table. Is there an API that supports creating a table?
Beta Was this translation helpful? Give feedback.
All reactions