Hey Everyone. I was wondering if anyone has used the SQL Connector to successfully call a function in Postgres. I have the following statement: SELECT * FROM execute_generated_sql() AS (First_Name text, Last_Name text, Age text)
This works find when hard coded but I want to pass through First_Name text, Last_Name text, Age text as parameter. I have tried he typical SQL synatx for parameters but that does not work.
I just wrote a quick test to make sure this worked as expected and it does. You need to use $1 /$2/etc as the parameter names. See configuration below:
Hey Ben. Thank you. This is super helpful and I will definitely check out your SQL Database Connector. I have tested a function with parameters that are numbers and they work ok, but if I need to pass text into the function, that is when I get an error. For example, I need to pass ‘First_Name text, Last_Name text, Age text’ as the parameter string. I think there is an issue when Bubble attempts to pass these values.
I’m not sure why that wouldn’t work, I tried with text parameter now and it worked properly. Let me know if you can’t get it figured out and I can try to assist further.