Every Supabase project comes with a full Postgres database, a free and open source database which is considered one of the world's most stable and advanced databases.
PostgreSQL the database was derived from the POSTGRES Project, a package written at the University of California at Berkeley in 1986. This package included a query language called "PostQUEL".
In 1994, Postgres95 was built on top of POSTGRES code, adding an SQL language interpreter as a replacement for PostQUEL. Eventually, Postgres95 was renamed to PostgreSQL to reflect the SQL query capability.
After this, many people referred to it as Postgres since it's less prone to confusion. Supabase is all about simplicity, so we also refer to it as Postgres.
You don't have to be a database expert to start using Supabase. Our table view makes Postgres as easy to use as a spreadsheet.
Dig into the relationships within your data.
You can duplicate your tables, just like you would inside a spreadsheet.
Supabase comes with a SQL Editor. You can also save your favorite queries to run later!
- Supabase extends Postgres with realtime functionality using our Realtime Server.
- Every project is a full Postgres database, with
- Managed backups - Supabase handles all your database backups.backups
- Data imports - import directly from a CSV or excel spreadsheet.
backups Database backups do NOT include objects stored via the Storage API, as the database only includes metadata about these objects. Restoring an old backup will not restore objects that have been deleted since then.
To expand the functionality of your Postgres database, you can use extensions. You can enable Postgres extensions with the click of a button within the Supabase dashboard.
Learn more about all the extensions provided on Supabase.
Supabase provides a realtime engine on top of Postgres, so that you can listen to changes as they happen. Our realtime engine uses the built-in replication functionality of Postgres.
Realtime server broadcasts database changes to authorized users depending on your Row Level Security (RLS) policies. We recommend that you enable row level security and set row security policies on tables that you add to the publication. However, you may choose to disable RLS on a table and have changes broadcast to all connected clients.
You can manage the realtime system, simply by
For example to enable realtime only for individual tables:
By default only "new" values are sent, but if you want to receive the old record (previous values) whenever you
delete a record,
you can update the replica identity of your tables, setting it to
Migrating projects can be achieved using standard PostgreSQL tooling. This is particularly useful for older projects (e.g. to use a newer Postgres version).
- Make sure Postgres is installed so you can run
- Create a new Supabase project.
- If you enabled Function Hooks on your old project, enable it on your new project.
- Store the old project's database URL as
$OLD_DB_URLand the new project's as
ALTER ROLE postgres SUPERUSERin the old project's SQL editor
pg_dump --clean --if-exists --quote-all-identifiers -h $OLD_DB_URL -U postgres > dump.sqlfrom your terminal
ALTER ROLE postgres NOSUPERUSERin the old project's SQL editor
ALTER ROLE postgres SUPERUSERin the new project's SQL editor
psql -h $NEW_DB_URL -U postgres -f dump.sqlfrom your terminal
TRUNCATE storage.objectsin the new project's SQL editor
ALTER ROLE postgres NOSUPERUSERin the new project's SQL editor
- The new project will have the old project's Storage buckets, but not the objects. You will need to migrate Storage objects manually.
When you create a new project in Supabase we ask for a password. You can use this password to connect directly to your Postgres database.
If you forget your password, you can reset it from the Dashboard under the database settings page, or through the SQL editor as such:
Read more in Database Configuration.
Your database is initialized with the UTC timezone. We recommend keeping it this way, as it is helpful for time calculations. If, however, you want to update the timezone, you can do so using any of the database timezones.
Read more in Database Configuration.