Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

DataCamp

Transactions and Error Handling in PostgreSQL

via DataCamp

Overview

Ensure data consistency by learning how to use transactions and handle errors in concurrent environments.

Being able to leverage transactions and find and handle errors is critical to building resilient SQL scripts and working with databases. Transactions provide the protection needed to ensure that your data is consistent and operations work on the desired data in concurrent environments. Improper error handling can cause many serious and unexpected issues. Without the proper use of transactions and error handling, it's possible to make decisions based on incorrect data leading to false outcomes. In this course, we'll cover proper ways to use transactions and handle errors with a record of what went wrong. Additionally, we discuss how concurrently plays into the use of transactions and data outcomes. We'll practice these concepts on the FFEIC bank health data and with a patient data table.

Syllabus

  • Getting to Know Transactions
    • This chapter focuses on learning about single and multistatement transactions and the read committed isolation level.
  • Rolling Back and Savepoints
    • How to rollback when an error is encountered in a transaction block and setting savepoints.
  • Handling Exceptions
    • In this chapter, you'll learn about exceptions and how to handle them.
  • Stacked Diagnostics
    • With stacked diagnostics, you can get all the information available from PostgreSQL about an exception.

Taught by

Jason Myers

Reviews

Start your review of Transactions and Error Handling in PostgreSQL

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.