Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

updates the blog post

Copple93d341e7c4c3
diff --git a/apps/www/_blog/2023-04-14-pg-tle.mdx b/apps/www/_blog/2023-04-14-pg-tle.mdx
index 3b1d2b84367..339ab18a5fd 100644
--- a/apps/www/_blog/2023-04-14-pg-tle.mdx
+++ b/apps/www/_blog/2023-04-14-pg-tle.mdx
@@ -11,11 +11,11 @@ image: launch-week-7/day-5-supabase-pg-tle/day-5-postgres-tle-thumb.jpg
thumb: launch-week-7/day-5-supabase-pg-tle/day-5-postgres-tle-thumb.jpg
---
-Most PostgreSQL cloud providers, such as Supabase and AWS RDS, do not allow users to install Postgres extensions into their databases until they have been rigorously vetted. Because of this, many useful Postgres extensions cannot be used on cloud platforms. To solve this, the RDS team has developed a new kind of extension called a **Trusted Language Extension** (TLE).
+Most PostgreSQL cloud providers, such as Supabase and AWS RDS, do not allow users to install Postgres extensions into their databases until they have been rigorously vetted. Because of this, many useful Postgres extensions cannot be used on cloud platforms. To solve this, the RDS team has developed a new kind of extension called a **Trusted Language Extension** (TLE).
A TLE is a Postgres extension that is written in a Trusted Language, and it can be installed in any Postgres provider that has the [pg_tle](https://github.com/aws/pg_tle) extension installed. The goal is to make more extensions available to developers, even if your database is hosted on the cloud.
-## How Postgres extensions work
+## How Postgres extensions work
Before exploring what a Trusted Language Extension is, let’s cover the basics of Postgres Extensions and the notion of “Trusted Languages” in general.
@@ -45,20 +45,15 @@ Near the end of 2022, we got a surprise gift from the team at Amazon Web Service
Of course, TLEs _must_ be written in trusted languages as described above, hence the name, so no extensions that are written in C can be TLEs. There are still many extensions that are already written in trusted languages, and soon many more to come with some exciting progress in more performant trusted languages like [pl/rust](https://github.com/tcdi/plrust) which recently reached an official 1.0.0 version release. By removing the constraint that extensions must be installed on the server filesystem, TLEs open up a whole new world of possibilities for packaging and distributing new and modular functionality for Postgres.
-pg_tle is available on new Supabase projects and on Amazon RDS for Postgres 14.5 and higher. Supabase also includes an extension called [pgsql-http](https://github.com/pramsey/pgsql-http) for making HTTP calls from SQL to REST APIs. So, naturally putting two and two together, we thought it would be cool to see if it’s possible to install TLEs from a REST API using only SQL!
-
-You can, and we’ll show you how downloading TLEs directly into your database turns out not only to be possible but also very powerful! In this blog post we will present a prototype for this idea, and our future plans to extend TLEs into a full _community ecosystem_ of installable packages, just like many other languages enjoy. pip for Python, npm for Javascript, cargo for Rust, cpan for Perl, and now dbdev for Postgres!
-
-## The Extension Shortfall
+## Collaborating with AWS
Because untrusted extensions are, by nature, able to break the security rules of Postgres, cloud providers are quite conservative about what extensions to provide to their customers. New extensions are rarely adopted quickly. This slows down the speed that new software can be created and shared. Open source requires opportunity and momentum, and by closing off the opportunity for Postgres users to quickly create, install, evaluate and iterate extensions, progress is slowed. TLEs offer an opportunity for open source developers to create and share code without having to wait for cloud providers or other gatekeepers to install it.
-After AWS released `pg_tle`, we realized immediately how powerful the tool is, and how it will change the way people release and install trusted extensions forever. After reaching out, we started collaborating with the TLE team at AWS and exchanging ideas and resources to further promote TLEs in both our database platform and theirs. By both Supabase and AWS providing the TLE extension in their respective Postgres platforms, we are unifying a standard package platform across two of the largest Postgres cloud providers in the world. We hope that other Postgres cloud providers will get on the bandwagon and provide TLE support as well, so that extension developers can leverage a large community base that greatly multiplies the reach of their efforts.
+When AWS released `pg_tle`, we realized immediately how powerful the tool is, and how it will change the way people release and install trusted extensions forever. We started collaborating with the TLE team at AWS, exchanging ideas and resources to further promote TLEs in both our database platform and theirs. By providing the TLE extension in both Supabase and AWS, we are unifying a standard package platform across two of the largest Postgres providers. We hope that other Postgres cloud providers will join the collaboration so that extension developers can leverage a large community base that greatly multiplies the reach of their efforts.
-## Installing dbdev with Migrations
+## Installing TLEs with database.dev
-If you don’t have a Supabase account head on over to our [signup page](https://app.supabase.com/sign-up) for a free hosted Postgres database that’s ready to go!
-
-Next you will need to install the dbdev client in your database. You can achieve that by executing the snippet of SQL code in the [link here](https://database.dev/installer). Typically you would include this snippet of SQL code in your migration tooling so that it is available whenever you bootstrap your projects. The setup script is designed to be “idempotent” so you can run it multiple times without harm. Once the client is installed from your migration scripts, you can call `dbdev.install(<package_name>)` to install the actual TLEs you want to use in your application. Whenever you want to add a new TLE, add a new migration that calls `dbdev.install()`, and you’re ready to go! You can discover packages to install at [database.dev](https://www.notion.so/LW7-dbdev-database-dev-read-only-b537cf0c90934f2280f23898720e8b3e).
+pg_tle is available on new Supabase projects and on Amazon RDS for Postgres 14.5 and higher. Supabase also includes an extension called [pgsql-http](https://github.com/pramsey/pgsql-http) for making HTTP calls from SQL to REST APIs. So, naturally putting two and two together, we thought it would be cool to see if it’s possible to install TLEs from a REST API using only SQL!
-If you are using RDS, TLEs are available immediately but the `dbdev` client is not yet installable due to its dependency on `pgsql-http`. We are currently working with the RDS team to find a secure option for package fetching that removes all non-`pg_tle` dependencies with the goal of enabling `dbdev` on RDS and any other Postgres hosting provider with support for `pg_tle`.
+We've created a new package registry, dbdev, that makes it easy to install extensions in your database migrations - as easy as: `select dbdev.install('langchain-embedding_search')`.
+You can read more about dbdev in our other blog post: [dbdev: a PostgreSQL Package Manager](/blog/dbdev).