Hi All, I'm trying to modify the database in my pr...
# sql
a
Hi All, I'm trying to modify the database in my project using DBeaver, I can connect no problem and see everything, but when I try to make any changes to the DB I get 'ERROR: must be owner of table xxxxxx', I used the credentials in the UI but it seems like that might using a different user to create tables? Any help is appreciated
j
if you're using dbeaver, then you're logged in as the
postgres
user i believe? to make changes to a table, you could assign table ownership to this user by going to the supabase SQL editor and executing
ALTER TABLE public.your_table OWNER TO postgres;
or similar https://stackoverflow.com/questions/31824658/how-to-change-the-ownership-of-a-table-in-database/31869945
a
Thanks, and yes that's who I'm logged in as, but then I would assume that if I change ownership then I won't be able to make changes in the Supabase UI since that will be a different user. Is there a way to log into DBeaver with the same user as the Supabase UI? Sorry, I'm somewhat new to Postgres
j
you shouldn't face that issue, because the supabase UI user (called`supabase_admin`) is a superuser with elevated privileges, so it should still be able to edit a table as needed. give it a shot to see if that's the case i dont know of a way to login to dbeaver as
supabase_admin
, but
postgres
should be enough for most cases.
a
I see, that makes sense, just don's want to mess up the Supabase UI functionality