First time using PostgreSQL with Supabase with just Excel as prior knowledge, and the AI assistant helped me create the queries and even actions from me! I'm loving it!
We are putting together a series on postgres functions - check out this playlist which will be updated weekly: ua-cam.com/play/PL5S4mPUpp4OtkMYxAxNpEuuDQuI2pWF3-.html
I'm running the local development instance and can't find the "New query" button, or the search field, in the SQL editor. Is that a known version "issue" or lack of functionality in the local instance?
Exactly! We have a series of videos covering just these topics coming over the next few weeks. We will be adding them to this playlist as we go: ua-cam.com/play/PL5S4mPUpp4OtkMYxAxNpEuuDQuI2pWF3-.html
Hi, is there a way to sync Database Functions to files in a local git project so we can seamlessly use our favorite IDE? Let's say having a command for Supabase CLI to retreive functions?
amazing stuff. as mostly a dba i really groan when logic is not done in the backend. im guessing that functions are the preferred way of integrating PLPGSQL rather than stored procedures?
Excellent thanks. One question, how can a function with parameters be applied as an array with n objects inside? like this: [ {"abc":111, "xyz":"all"}, {"abc":222, "xyz":"not"}, {"abc":333, "xyz":"yeah"} ]. The questions is because in your case you use single parameters, but I have no idea how to use an array as a parameter in the function. Can you help me. Thanks
Great example, but I'm trying to find an example where an array of uuids is used as parameters into a select "where" clause, but can't seem to find it anywhere. Anyone knows how to? I've added the argument as 'uuid[]', and the function as ` begin select subproduct, count(*) from subproducts_daily_data where subproduct = any(subproducts::uuid[]) group by subproduct; end; ` It always returns an error 42883, Operator does not exist: uuid = uuid[].
How can I call this function from the frontend passing a parameter? Below Supabase > SQL Editor > Query, I created and tested my query and it's working fine. create or replace function get_males(gender_input text) returns setof heroes as $$ begin return query select * from heroes where heroes.gender = gender_input; end; $$ language plpgsql; Call this function from the frontend, it's not working. ... const { data } = await supabase.rpc("get_males", "Male").select(*); ... Pls could you help me? Thks
bruh the entertainment factor of these videos. . . why don't you just make videos on everything that I'm interested in like tesla turbines and generators and stuff?
1:39 duuuuude those next 15 seconds I did not expect at all, that was brilliant
As an Australian who started their journey producing rap songs and now writes apps, I find Mr. Myers an appropriate muse. Supabase is great!
Fantastic tutorial, didn't expect to be cracking up looking at table rows lool
You should do more and more videos of supabase. I enjoy and learn so much of everything you demo. Thank you very much. Really.
First time using PostgreSQL with Supabase with just Excel as prior knowledge, and the AI assistant helped me create the queries and even actions from me! I'm loving it!
I had no idea postgres could do all of this, awesome video, thank you !
Love that you explained while other videos ive seen show how to set a function up they didnt explain what it actually does or mean. Thank you!
I was looking for something like this just a couple weeks ago! Thanks for the video, would love an even more in depth follow up.
We are putting together a series on postgres functions - check out this playlist which will be updated weekly: ua-cam.com/play/PL5S4mPUpp4OtkMYxAxNpEuuDQuI2pWF3-.html
This video is really good , and I wrote my first plpgl function this afternoon albeit in pgadmin. Helps explain stuff I couldn’t grasp
Great tutorial! Thank you!
Thanks Florin! Glad you enjoyed it!
Great video! Clear and to the point, keep ‘em coming! 👍💙
More functions related material coming each week for in this playlist: ua-cam.com/play/PL5S4mPUpp4OtkMYxAxNpEuuDQuI2pWF3-.html
really amazing video you should link this to the docs :)
WOOOOOO! It's awesome and powerful! i need a full curse about EdgeFunctions, plpgsql and triggers.
Very well explained! Thank you so much :))
love the little jokes at the start!
that was fun informative and right to the point, thanks Jon for your efforts.
Awesome! Glad you enjoyed it! 🙌
I'm running the local development instance and can't find the "New query" button, or the search field, in the SQL editor. Is that a known version "issue" or lack of functionality in the local instance?
Great tutorial, thanks so much for this. Can you please update the description as you said about calling the functions from javascript?
This looks super useful combined with triggers and client sdk
Exactly! We have a series of videos covering just these topics coming over the next few weeks. We will be adding them to this playlist as we go: ua-cam.com/play/PL5S4mPUpp4OtkMYxAxNpEuuDQuI2pWF3-.html
@@JonMeyers nice work guys
@@albertodeagostini6143 The triggers and client sdk videos are now live 👍
@@JonMeyers Thanks man
Reaaaally great tutorial. Thank you very much!
3:09 how can we create a function using javascript?
Hi, is there a way to sync Database Functions to files in a local git project so we can seamlessly use our favorite IDE? Let's say having a command for Supabase CLI to retreive functions?
More about Postgres Functions: supabase.com/blog/2021/07/30/supabase-functions-updates?MJZCCpCYEqk
where can I review all the functions i have created ? thanks
Thanks team for this great tutorial.
Thanks Nabeel! Glad you enjoyed it!
loved these videos.
amazing stuff. as mostly a dba i really groan when logic is not done in the backend. im guessing that functions are the preferred way of integrating PLPGSQL rather than stored procedures?
Excellent thanks. One question, how can a function with parameters be applied as an array with n objects inside? like this:
[
{"abc":111, "xyz":"all"},
{"abc":222, "xyz":"not"},
{"abc":333, "xyz":"yeah"}
].
The questions is because in your case you use single parameters, but I have no idea how to use an array as a parameter in the function. Can you help me. Thanks
Did you solve this problem? I am having the same problem
Thank you! I signed up
What is create or replace view ? What are views in supabase what it does ?
Great example, but I'm trying to find an example where an array of uuids is used as parameters into a select "where" clause, but can't seem to find it anywhere. Anyone knows how to?
I've added the argument as 'uuid[]', and the function as
`
begin
select subproduct, count(*)
from subproducts_daily_data
where subproduct = any(subproducts::uuid[])
group by subproduct;
end;
`
It always returns an error 42883, Operator does not exist: uuid = uuid[].
So it's unavailable for self hosting?
sad news :|
How to push pg-functions from local to remote using cli?
Great tutorials! How would I return the output of a join between two tables?
Colleagues thought I was scrolling memes at work lmao
How can I return the information in a JSON format from a table?
Is there a way to share the SQL editor queries across a team of people?
how do I return/throw a custom error from the function?
Can you write these functions in python and schedule them?
How can I call this function from the frontend passing a parameter?
Below Supabase > SQL Editor > Query, I created and tested my query and it's working fine.
create or replace function get_males(gender_input text) returns setof heroes as $$
begin
return query select *
from heroes
where heroes.gender = gender_input;
end;
$$ language plpgsql;
Call this function from the frontend, it's not working.
...
const { data } = await supabase.rpc("get_males", "Male").select(*);
...
Pls could you help me?
Thks
Solved. I'm doing an error calling rpc function
let gender_input = "Male";
const { data, error } = await supabase.rpc("get_males", {
gender_input,
});
if (error) console.error(error);
else console.log(data);
Awesome 🤩
thank you
Amazing!
times have changed, shots fired at rappers by a database tutorial
Did dj khaled dirty 😂😂
4:34
Oh the classic create whole database to undrestand you're neighbors instead of go chat with them that's real programer
bruh the entertainment factor of these videos. . . why don't you just make videos on everything that I'm interested in like tesla turbines and generators and stuff?
like the humour
10:03
These videos are hilarious lol
another one had me laughing so hard
99 problems 😅
It is amazing that the gold standard language for relational databases, is still the ugliest most verbose language on the planet .. SQL
🤣 another one
wtf is this? am I going to learn sql to use SB?
Yikes Kanye West, that aged poorly