Instruction
Good job! Now, it's time to review what we learned in this part. There are multiple ways you can invoke one function inside another:
- By using the
SELECT INTOsyntax:SELECT thumbs_down, thumbs_up INTO downvotes, upvotes FROM get_post_score(17);
- By using a function in assignment:
user_id := get_most_active_user();
- If you want to omit the result returned by the function, use
PERFORM:PERFORM remove_user_account(101);
If the function is not supposed to return a value, specify void as its return type.
Using functions, you can also return tables or sets with the following commands:
RETURNS TABLEalong withRETURN QUERYorRETURN NEXT.RETURNS SETOFalong withRETURN QUERYorRETURN NEXT.
Exercise
Click to go through the final recap exercises!



