function uuid_generate_v4() does not exist

I was trying to run some of the setup scripts from the Remix K-pop stack and they failed due to above. On checking extension UUID-OSSP is installed and enabled. Running create extension "uuid-ossp" with schema extensions; also confirms this but the script select uuid_generate_v4(); fails with above error.
23 Replies
garyaustin
garyaustin4y ago
Do you have extensions in your search path?
Chris Brannen
Chris BrannenOP4y ago
I can see Extensions under the Database tab and UUID-OSSP appears enabled there
garyaustin
garyaustin4y ago
if you do select extensions.uiid_generate_v4() does that work? Your comment did not address your search path settings.
Chris Brannen
Chris BrannenOP4y ago
running the above also failed. But I not sure I understand what you mean by search path then. Apologies I've only just started to look at Supabase
garyaustin
garyaustin4y ago
When running SQL there is a search path with various schemas to look for things and in what order.
https://dba.stackexchange.com/questions/56023/what-is-the-search-path-for-a-given-database-and-user extensions has to be in that if you do not do extensions.function but it sounds like even that did not work...
Database Administrators Stack Exchange
What is the search_path for a given database and user?
I can see the current search_path with: show search_path ; And I can set the search_path for the current session with: set search_path = "$user", public, postgis; As well, I can permanently set...
Chris Brannen
Chris BrannenOP4y ago
ok makes sense. Running show search_path does list "$user", public, auth, extensions
garyaustin
garyaustin4y ago
OK, sorry for the round about, that is usually the issue with extensions not showing up... So I have no idea now, what your issue is... 😕
Chris Brannen
Chris BrannenOP4y ago
no probs, it is often the case that it's a simple issue. I'll try deleting project and restarting to see if that fixes, Thanks for your help 😃
garyaustin
garyaustin4y ago
@Chris Brannen This might be interesting... https://status.supabase.com/
We've released a new extension on the platform which moves the "uuid" type into a new schema. As a result the storage server (which relies on this extension) was unable to create the relevant schema. We're cutting a new version of our Postgres image to fix this, which could take some time.
We've released a new extension on the platform which moves the "uuid" type into a new schema. As a result the storage server (which relies on this extension) was unable to create the relevant schema. We're cutting a new version of our Postgres image to fix this, which could take some time.
Supabase Status
Welcome to Supabase's home for real-time and historical data on system performance.
Chris Brannen
Chris BrannenOP4y ago
Chances are this is cause, I'll check this once status indicates resolved👍
garyaustin
garyaustin4y ago
https://github.com/supabase/supabase/issues/3351 dropped your situation here. Not really sure it is related but that is the issue the status is about.
GitHub
Tenant config for ID not found. · Issue #3351 · supabase/supabase
My storage bucket has been removed.. Currently all of my resources are not loaded. Unknown error popup is shown when I enter storage page in Supabase web dashboard. And same error popup is shown wh...
garyaustin
garyaustin4y ago
SB responded to that, it is your issue also.
dubo
dubo4y ago
Having the same issue but my project isn't new but was paused this morning
garyaustin
garyaustin4y ago
I'm guessing it pulls in new config when it spins up.... You might mention that in the issue, so they know to look for those cases also depending on their fix. They did say restores would also be affected.
dubo
dubo4y ago
Just saw that you already mentioned it in the issue, thank u sm
garyaustin
garyaustin4y ago
Yeah I saw a SB employee post and wanted to catch him.
Chris Brannen
Chris BrannenOP4y ago
looks to be resolved as select uuid_generate_v4(); works without issue this morning 😃
dubo
dubo4y ago
Yup it's working now!
freshandlow
freshandlow3y ago
Picking up this old thread as am hitting this issue when setting up supa_audit (https://github.com/supabase/supa_audit). The scripts fail with the "function uuid_generate_v4() does not exist error." preventing inserts or any changes to the tables being audited. Also running select extensions.uiid_generate_v4() fails with the same error. The project is approx 2 weeks old (early/mid October) so post August 16th but same issue as above. Any ideas on the issue and how to fix v much appreciated.
peterkimzz
peterkimzz3y ago
Same here
peterkimzz
peterkimzz3y ago
@freshandlow Oh, I got the solution. I've rollbacked my project db schema by clicking a button located on top right corner.
No description
freshandlow
freshandlow3y ago
Glad you got it sorted. Weirdly this migration hasn't been applied to my project yet, so guess its something else:
No description
NanoBit
NanoBit3y ago
When I had this issue, I just had to prepend with extensions.uuid.... How are you running the script? Directly via SQL Editor or other tool?

Did you find this page helpful?