O'Reilly logo

PostgreSQL 9 Administration Cookbook - Second Edition by Simon Riggs, Gianni Ciolli, Hannu Krosing, Gabriele Bartolini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updatable views

PostgreSQL supports the SQL standard CREATE VIEW command, which, starting from version 9.3, supports automatic UPDATE, INSERT, and DELETE commands, provided they are simple enough.

With older PostgreSQL versions or with more complex views, these operations can be simulated with suitable query rewrite rules, or more recently by INSTEAD OF triggers. Note that according to community support policies, at least until September 2017, there will be PostgreSQL versions prior to 9.3 that are still supported and do not support automatic updatable views. Therefore, if you are using version 9.3 or later, only the discussion in the Getting ready section of this recipe will be of interest; the rest is implemented automatically.

Note also that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required