public.http_request() Function Not Found by Trigger

The Supabase SQL trigger on_auth_user_created fails with ERROR: 42883: function public.http_request() does not exist. This occurs despite attempts to create the public.http_request wrapper function (which uses net.http_post) in the SQL editor, suggesting the function is either not being created successfully or is not visible to the trigger.
4 Replies
skuse
skuseβ€’2mo ago
http_request is in the supabase_functions schema, not public Β πŸ€™
ΰΌ’π“šπ“ͺ𝓽π“ͺ𝓻𝓲𝓷π“ͺ ~ ΰ£ͺΛ– ִ֢ཐི༏ཋྀ
Hey Supabase Admin, I'm trying to set up a trigger in my project (ID: nemluxhhfwegfpffpike) that calls an Edge Function on user signup. To do this, I'm trying to create a helper function in my database. The image is the SQL code for the helper function I'm trying to create: The Problem: When I run this SQL in the Supabase SQL Editor, I consistently get the following error on Line 17: ERROR: 42704: type "extensions.http_response" does not exist What I've already confirmed/tried: pg_net extension is enabled in my project's "Database > Extensions" section. My screenshot confirms pg_net is "Installed in extensions schema". The SQL code explicitly sets SET search_path = public, extensions; for the session. I've tried dropping and recreating functions, and running in fresh query tabs multiple times. I've tried granting USAGE on extensions schema and EXECUTE on extensions.http_request to postgres. It seems like despite pg_net being enabled and installed in extensions, the database isn't recognizing its types or functions within that schema. Any insights or help would be greatly appreciated! Thx.
No description
garyaustin
garyaustinβ€’2mo ago
pg_net stuff is in the net schema. You install to extensions but it creates its stuff in net. If you look at the docs it shows that: https://supabase.com/docs/guides/database/extensions/pg_net https://github.com/supabase/pg_net

Did you find this page helpful?