I want to create a new table using postgREST, but I was not able to find anything about this in the documentation. Is it possible to create tables? If yes, how?
Sorry if this questions was already asked, but unfortunately I always found solutions for postgres (without t :D)
Thx :)
you can create stored function that creates the table for you, then call that function via postgrest
something like:
then call
/rpc/create_foo_table
in Postgrestyou'd need to reload Postgrest's schema cache after this, in order to read the table: https://postgrest.org/en/v7.0.0/admin.html?highlight=reload#schema-reloading
This likely has security implications, so be careful, especially if using dynamic SQL to create the table