PGCon2017 - 0626

PGCon 2017
The PostgreSQL Conference

Speakers
Yoshifumi Masunaga
Yugo Nagata
Schedule
Day Talks - Day 1 - 2017-05-25
Room DMS 1120
Start time 13:00
Duration 00:45
Info
ID 1074
Event type Lecture
Track Hacking
Language used for presentation English
Feedback

Extending View Updatability by a Novel Theory

Prototype Implementation on PostgreSQL

Although PostgreSQL supports automatically-updatable, the conditions are restrictive, and complex views are not automatically updatable. To update these views, you still need to define specific triggers or rules for every views. However, a recent study has proposed a novel approach extending view-updatability for generally defined views. In order to test the feasibility of the theory, I'm developing an implementation of the algorithm as the proof of concept. This talk will introduce the overview of the theory, and explain how the prototype is implemented and how it works.

Since PostgreSQL 9.3, automatically-updatable views has been supported. Thanks to the feature, you can update simple views without creating INSTEAD OF triggers or INSTEAD rules. However, the conditions are restrictive, and complex views, such as the ones including JOIN, are not automatically updatable. To update these views, you still need to define specific triggers or rules for every views. It would be nice if we could relax the prerequision for the automatically-updatable views.

In fact, updatability of complex views is a hard problem, and has been studied for a long time. In a recent study, a novel approach extending view-updatability for generally defined views has been proposed. In this approach, view-updatability is based on guessing user's update intention by algorithm called "Pro Forma Guessing of Update Intention". If user's update intention can be guessed uniquely by this algorithm, views are updatable as the guessed intention, even if the view has JOIN, UNION, and so on. If we could have this in the PostgreSQL's automatically-updatable views, it would bring great benefit to users.

In order to test the feasibility of the theory, I'm developing an implementation of the algorithm as the proof of concept. The prototype is developed as an extension of PostgreSQL. This also uses INSTEAD OF trigger, but you don't need to define specific triggers for your views, because the extension provides the trigger function for general defined views.

This talk will introduce the overview of the theory, and explain how the prototype is implemented and how it works.