S
Supabase•3y ago
Vengeance

time_bucket does not exist

TimeScaleDB is enabled in extensions, but when I try to use time_bucket I get Failed to run sql query: function time_bucket(unknown, timestamp with time zone) does not exist, any ideas? https://docs.timescale.com/api/latest/hyperfunctions/time_bucket
14 Replies
garyaustin
garyaustin•3y ago
Do you have extensions in the search_path? It could also be a parameter miss match in your call, but I don't know that extension.
Vengeance
VengeanceOP•3y ago
I'm using the sql editor in the webapp, the cron extension and http extensions work fine, but none of the timescaledb functions show up in the intellisense
Vengeance
VengeanceOP•3y ago
select name, comment, default_version, installed_version
from pg_available_extensions
where name = 'timescaledb';
select name, comment, default_version, installed_version
from pg_available_extensions
where name = 'timescaledb';
it's definitely installed
No description
Vengeance
VengeanceOP•3y ago
maybe it's cause the timescaldb schema is graphql_public, but I tried OPERATOR(graphql_public.time_bucket) and that didn't work either
garyaustin
garyaustin•3y ago
I don't know much about it, but seems odd for that to be in graphql_public
Vengeance
VengeanceOP•3y ago
Oh I figured it out alter user supabase_admin set search_path = public,extensions,graphql_public; and now it works
garyaustin
garyaustin•3y ago
So I just installed it, and there is a field to fill in when installing about the extension it goes in.
Vengeance
VengeanceOP•3y ago
ah, my colleague must have not filled that out 😆
garyaustin
garyaustin•3y ago
the schema it goes in. You might want to uninstall and reinstall. Not sure you want it in graphql as that is used for .... graphql.
Vengeance
VengeanceOP•3y ago
great, thanks so much for your help :supafire:
Vengeance
VengeanceOP•3y ago
now I can't uninstall it 😅
No description
garyaustin
garyaustin•3y ago
yikes. let me see if I can uninstall it.... uninstalled and cleaned up dozens (hundred?) functions it had created. When you look in the extension screen did it actually say it was in graphql_public? Was not clear how you got that. Mine said it was in extensions when I went to delete it. I've only seen about a dozen users talking about using it here and github, so not sure how much help there is.
If this is an instance with alot of stuff on it, you may need to contact support.
Vengeance
VengeanceOP•3y ago
my colleague enabled it, he said he put graphql by accident
No description
garyaustin
garyaustin•3y ago
I just toggled that green button and it was gone. But I also did not run anything with it. It is possible if you ran anything, there is some cleanup that has to be done first. It is also possible there is a grant issue with using that schema. I would not think something else in the schema would hurt it, as extensions schema has many extensions in it.

Did you find this page helpful?