I am trying to make a user defined function that returns nothing. I have the body:
select form from bookings where id=$1 where $1 is the first and only argument the function takes.
I’ve tried
create function findBookgins(character varying(100)) returns void
select form from bookings where id=$1;
and I get an error at the select. I just want the table created to be displayed.
You have syntax errors in your function. You need to properly quote the body of the function.
I think the documentation on SQL-based functions will be particularly helpful to you.
By the way, I really can’t believe you want this particular function to return nothing. What is the point of that?