End of Summer - hours only!Up to 80% off on all courses and bundles.-Close
Side-effects in functions
Invoking functions


Well done! The most straightforward way to invoke a function is by using a SELECT statement.

The example below shows how to call the add_event() function using a SELECT statement:

SELECT add_event(smallint '1', 'PostgreSQL Conference', 'London');

This is in contrast to invoking a function within another function. Here, we've called the function via a console window, not in the code.


Write a SELECT statement to call the add_topic() function which will insert a new topic with the name 'Quick cakes'.