Category: PostgreSQL
Implementation of complicated business processes in database often requires using stored procedures. In case of PostgreSQL it means using Pl/pgSQL language. Although it’s SQL’s close relative it has some differences which open up new opportunities for programmers.
The training shows PL/pgSQL constructions, ways of defining and developing procedures and triggers. Basing on practical examples we show how to close the business logic processes inside stored procedures and what are benefits of applying such architecture. Students also learn writing new triggers which preserve data integrity.
We also discuss the best practises while creating PL/pgSQL procedures and we emphasise the most common mistakes. We show when using PL/pgSQL is neccessary and when the procedure in SQL only is sufficient. We explain the difference between the two mentioned approaches.
Our instructors have many years of experience with PostgreSQL, both as administrators and as programmers. One of our trainers is a PostgreSQL contributor and a regular speaker at the world’s largest conference on the topic.
Duration
2 days
Agenda
- Procedures defining
- Input and output signature
- Scalars return
- Tables return
- Volatile, stable, immutable procedures
- PL/pgSQL language
- Language constructions
- Variables declaration
- Conditional expressions
- Loops and cursors
- Cooperation with SQL
- Explicit SQL calls
- Dynamic SQL
- Exceptions handling
- Complex procedures debugging
- Best practices of writing a code
- Language constructions
- Triggers
- Triggers defining
- Data acceptance, modification, discarding
- Examples of the triggers usage
Audience and prerequisites
We recommend that the participants know SQL language and have minimum experience with any programming language.
Certificates
Course participants receive completion certificates signed by ALX.