PostgreSQL – Programming in PL/pgSQL and Advanced Development Techniques (PGSQL2)

Databases, PostgreSQL

This intensive hands-on course covers modern server-side development with PostgreSQL. Through practical workshops you will master PL/pgSQL, develop stored procedures, use dynamic SQL safely and implement triggers and set-returning functions for real projects.

The course emphasizes transaction control, security against SQL injection and safe dynamic SQL, plus performance tuning with indexes, partitioning and plan analysis. Participants practice debugging, error handling and deployment best practices for production.

THIS TRAINING COURSE WILL HELP YOU:

  • Master PL/pgSQL idioms and proper procedure structure
  • Control transactions, savepoints and autonomous transactions
  • Use dynamic SQL safely and prevent SQL injection
  • Design and optimize triggers and set-returning functions
  • Tune performance using indexes, partitioning and plan analysis

WHO SHOULD ATTEND?

  • Backend developers working with PostgreSQL
  • Database administrators focused on performance
  • Software engineers using stored procedures
  • DevOps specialists implementing database automation

COURSE LOCATION AND AVAILABLE DATES



Choose whether to attend in person in our classroom or join online. You can select your preferred format during registration. Learn more about hybrid training.

Unlock your employees' potential. We can adapt every course in our portfolio to your objectives and participants.
Need training at your premises or want to tailor the content and duration? We will prepare the right solution, in Czech or English.

Request customised training

Course content:

Hide details
  • Introduction to server-side programming
    1. Basic architecture, benefits and limitations of server-side programming
    2. Options and languages for server-side - functions and procedures
  • Procedures in SQL
    1. Inlining SQL procedures
    2. Array processing and loops
    3. Using CTEs instead of procedures
  • Introduction to PL/pgSQL
    1. PL/pgSQL basics - block syntax and scoping
    2. Variables, parameters and types
    3. Control structures
  • Error handling and debugging
    1. Exceptions and catching them
    2. Raising exceptions, assertions
    3. Debuggers for PL/pgSQL
  • Transactions
    1. Isolation levels in PostgreSQL and transaction control in procedures
    2. Savepoints, subtransactions and autonomous transactions
    3. Preventing errors and locking
  • Dynamic SQL
    1. Reasons and methods for using dynamic SQL
    2. Security and SQL Injection
    3. Cursors and working with them
  • SRF functions
    1. Table-returning functions and their use
    2. Performance limitations of table functions
  • Triggers
    1. Types and capabilities of triggers in PostgreSQL
    2. Parameterized, recursive and other advanced techniques
    3. Good and bad uses of triggers and performance aspects
  • Views
    1. Overview and use of views
    2. Processing modes — advantages and disadvantages
    3. Materialized views
  • Temporary tables
    1. Use and properties of temporary tables
    2. Using temporary tables in PL/pgSQL
  • Indexes and basics of optimization
    1. Viewing execution plans
    2. Basic index types and their usage
  • Table partitioning
    1. Overview of partitioning types and options
    2. Benefits, limitations and comparison with indexes
  • Tips for PL/pgSQL development
    1. Performance best practices
    2. Security best practices
Prerequisites:
Basic knowledge of SQL and databases and experience using PostgreSQL.
Recommended previous course:
PostgreSQL – SQL Basics (PGSQL1)
Recommended follow-up course:
PostgreSQL – Administration and System Implementation (PSTGR1)
Schedule:
2 days (9:00-17:00)
Price per person:
576.00 € ( 696.96 € incl. 21% VAT)

Training and learning environment