To connect Astrato to Supabase, first, find the Session pooler connection string to Astrato
To find the session pooler string:
Click on πConnect, which appears at the very top of Supabase Studio's UI.
ββ
Select Session pooler as the method.
β
The full session pooler looks like this:postgresql://postgres.abcdefghijklmnop:[YOUR-PASSWORD]@aws-1-eu-west-2.pooler.supabase.com:5432/postgres
Astrato requires only some parts of the session pooler URL, examples are below:Username:
user.accountHost:
aws-0-eu-west-0.pooler.supabase.comPort:
5432
π§βπ» Code to create a new user in Supabase for Astrato
π§βπ» Code to create a new user in Supabase for Astrato
create user astrato with password '--ENTER YOUR PASSWORD--';
GRANT CONNECT ON DATABASE postgres TO astrato;
-- 3. Grant usage on the 'public' schema (where your tables usually live)
GRANT USAGE ON SCHEMA public TO astrato;
-- 4. Grant access to all EXISTING tables in the public schema
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO astrato;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO astrato;
-- 5. (Optional) Grant access to all FUTURE tables automatically
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO astrato;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO astrato;
alter default privileges in schema public
grant select, insert, update, delete on tables to astrato;
ALTER ROLE astrato LOGIN;
βΉοΈ We recommend not to use the default account to connect to tools. Consider creating a new db user, for use with Astrato.




