v0.0.5Created a year agoBy supabase


dbdev is the SQL client for and is the primary way end users interact with the package registry.

dbdev can be used to load packages from the registry. For example:

-- Load the package from the package index
select dbdev.install('olirice@index_advisor');

Where olirice is the handle of the author and index_advisor is the name of the package.

Once installed, packages are visible in PostgreSQL as extensions. At that point they can be enabled with standard Postgres commands i.e. the create extension

To improve reproducibility, we recommend always specifying the package version in your create extension statements.

For example:

-- Enable the extension
create extension "olirice@index_advisor"
    schema 'public'
    version '0.1.0';

Which creates all tables/indexes/functions/etc specified by the extension.

How to Install

The in-database SQL client for the package registry is named dbdev. You can bootstrap the client with:

---- install dbdev ----
  - pg_tle:
  - pgsql-http:
create extension if not exists http with schema extensions;
create extension if not exists pg_tle;
-- drop dbdev with older naming scheme if present
drop extension if exists "supabase-dbdev";
select pgtle.uninstall_extension_if_exists('supabase-dbdev');
drop extension if exists "supabase@dbdev";
select pgtle.uninstall_extension_if_exists('supabase@dbdev');
        resp.contents ->> 'version',
        'PostgreSQL package manager',
        resp.contents ->> 'sql'
from http(
        || 'package_versions?select=sql,version'
        || '&package_alias=eq.supabase@dbdev'
        || '&order=version.desc'
        || '&limit=1',
                || 'c3MiOiJzdXBhYmFzZSIsInJlZiI6InhtdXB0cHBsZnZpaWZyY'
                || 'ndtbXR2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2ODAxMDczNzI'
                || 'sImV4cCI6MTk5NTY4MzM3Mn0.z2CN0mvO2No8wSi46Gw59DFGCTJ'
                || 'rzM0AQKsu_5k134s'
) x,
lateral (
        ((row_to_json(x) -> 'content') #>> '{}')::json -> 0
) resp(contents);
create extension "supabase@dbdev";
select dbdev.install('supabase@dbdev');
drop extension if exists "supabase@dbdev";
create extension "supabase@dbdev";

With the client ready, search for packages on and install them with

select dbdev.install('handle@package_name');
create extension "handle@package_name"
    schema 'public'
    version '1.2.3';


  1. Install the dbdev package manager
  2. Install the package:
select dbdev.install('supabase@dbdev');
create extension "supabase@dbdev"
    version '0.0.5';


  • 86859 all time downloads
  • 13467 downloads in the last 30 days
  • 37920 downloads in the last 90 days
  • 72015 downloads in the last 180 days