Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLstored procedures functionsSingle-choice MCQ

In PostgreSQL 14+, a function is written with a SQL-standard body using BEGIN ATOMIC instead of a string literal. What is one real advantage of this form?

CREATE FUNCTION total(o orders) RETURNS numeric LANGUAGE sql BEGIN ATOMIC SELECT o.qty * o.price; END;