Amazon Aurora DSQL now supports PL/pgSQL functions and procedures
Amazon Aurora DSQL now supports PL/pgSQL, enabling developers to create and execute stored functions and procedures directly in the database. Amazon Aurora DSQL is a serverless, distributed SQL database designed for applications requiring active-active availability across multiple AWS Regions with fast reads and writes. You can now encapsulate procedural programming constructs such as IF/ELSE statements, loops, and variable assignments alongside SQL operations within the database.
PL/pgSQL support reduces network round trips and improves application performance for data validation workflows, complex calculations, and transactional operations requiring multiple steps. Financial applications can implement account transfer procedures that validate balances, update multiple tables, and handle error conditions within a single database function.
PL/pgSQL support is available in all AWS Regions where Aurora DSQL is available. To learn more, see PL/pgSQL in the Aurora DSQL User Guide.