Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’5mo agoβ€’
2 replies
Medlac

Vault Help

I have enabled, ran sql queries, exposed the vault schema but i keep getting the same error:

{
  code: 'PGRST202',
  details: 'Searched for the function public.vault.create_secret with parameters name, secret or with a single unnamed json/jsonb parameter, but no matches were found in the schema cache.',
  hint: null,
  message: 'Could not find the function public.vault.create_secret(name, secret) in the schema cache'
}
{
  code: 'PGRST202',
  details: 'Searched for the function public.vault.create_secret with parameters name, secret or with a single unnamed json/jsonb parameter, but no matches were found in the schema cache.',
  hint: null,
  message: 'Could not find the function public.vault.create_secret(name, secret) in the schema cache'
}


Any ideas?

Here is the code triggering this error:
    const { data: vaultSecret, error: vaultErr } = await supabaseServiceRole.rpc(
      "vault.create_secret",
      { name: `id:${userId}`, secret: privatePem }
    );
    const { data: vaultSecret, error: vaultErr } = await supabaseServiceRole.rpc(
      "vault.create_secret",
      { name: `id:${userId}`, secret: privatePem }
    );



PS if i run:

create extension if not exists vault with schema vault;
create extension if not exists vault with schema vault;


I get:

ERROR:  0A000: extension "vault" is not available
DETAIL:  Could not open extension control file "/usr/lib/postgresql/share/postgresql/extension/vault.control": No such file or directory.
HINT:  The extension must first be installed on the system where PostgreSQL is running.
ERROR:  0A000: extension "vault" is not available
DETAIL:  Could not open extension control file "/usr/lib/postgresql/share/postgresql/extension/vault.control": No such file or directory.
HINT:  The extension must first be installed on the system where PostgreSQL is running.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Vault Secret & Supabase CLI help
SupabaseSSupabase / help-and-questions
13mo ago
Vault & PGsodium
SupabaseSSupabase / help-and-questions
7mo ago
Vault Extension
SupabaseSSupabase / help-and-questions
3y ago
Need help on Vault in k8s (helm)
SupabaseSSupabase / help-and-questions
6mo ago